Krzysztof Dynowski [Thu, 20 Aug 2015 14:10:52 +0000 (16:10 +0200)]
vsm: update network related help, formating changes
[Feature] clarify help for net-create command
[Cause] poor help on how to create virtual network
[Solution] extend description format, inerpretation
[Verification] Build, install, run vsm net-create help
Change-Id: I09b877d090607fb9f8d3c5b367f6f6b2d1a7ed85
Krzysztof Dynowski [Wed, 19 Aug 2015 10:51:22 +0000 (12:51 +0200)]
vsm: make vsm> prompt, finish prompt line on exit in interactive mode
[Feature] 'vsm>' prompt, new line when exit
[Cause] prompt gives clear info what is the interpreter
[Solution] N/A
[Verification] Build, install, use vsm command
Change-Id: Ic5b6751dbebc38d204565311380d6459448d25a0
Krzysztof Dynowski [Fri, 7 Aug 2015 09:05:14 +0000 (11:05 +0200)]
vsm: persistant history of entered commands in interactive mode
[Feature] Keep history of entered commands (in ~/.vsm_history file)
[Cause] No history after starting vsm
[Solution] use read_history/write_history from readline library
[Verification] Build, install, use vsm command
Change-Id: I107ba49ac01d52825312416a11fbb094735401af
Krzysztof Dynowski [Thu, 30 Jul 2015 12:04:25 +0000 (14:04 +0200)]
Support getting list of ip/mask for one interface, change netdev_set_ip* to netdev_add_ip*
[Feature] Get list of configured ip/mask for zone interface
[Cause] Many ip/mask entries can be assigned to one interface
[Solution] Implement generic method getting list of network addresses
[Verification] Build, install, use vsm net-add-ip to add ips
vsm net-list to get configured ips
Change-Id: I8d4c1b59e03800aa513811992cc13e71df8d599e
Krzysztof Dynowski [Fri, 31 Jul 2015 13:01:38 +0000 (15:01 +0200)]
Cleanup cppcheck statistics
[Feature] N/A
[Cause] Cppcheck results reported on jenkins contains error/warning messages
[Solution] Make code correction to satisfy cppcheck,
add cppcheck configuration to suppress some messages (e.g. API funcs)
[Verification] Have installed cppcheck >= v1.66
Perform ./tests/cppcheck/cppcheck.sh script before commiting to review
Change-Id: Ice10bbc118ab921feb9cb7261d4a2bdc22282353
Lukasz Pawelczyk [Tue, 4 Aug 2015 10:17:23 +0000 (12:17 +0200)]
lxcpp: fix linking of 3rd party binaries with lxcpp
[Feature] N/A
[Cause] To be finally able to link with lxcpp of 3rd party code
[Solution] N/A
[Verification] Link non-vasum program against liblxcpp
Change-Id: I218756ace9d9217db87d3e19b820d35653a22153
Mateusz Malicki [Mon, 27 Jul 2015 15:28:22 +0000 (17:28 +0200)]
InputMonitor connected to epoll dispatcher
[Feature] InputMonitor connected to epoll dispatcher
[Cause] N/A
[Solution] N/A
[Verification] Build, run tests
Change-Id: If2bdcd8c8493bc22357aa93b43b5c6e530c954d4
Dariusz Michaluk [Tue, 28 Jul 2015 13:55:25 +0000 (15:55 +0200)]
Add daemonize function to work in the background.
[Feature] Add daemonize function to work in the background.
[Cause] N/A
[Solution] N/A
[Verification] Build, run tests, run server as daemon.
Change-Id: Ie8987ac4d23ac350ab6036c476ade47436afbe69
Jan Olszak [Fri, 31 Jul 2015 15:11:16 +0000 (17:11 +0200)]
lxcpp: Added utils sources
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] Link only against liblxcpp
Change-Id: I7e9d32fc502a068dd9c50e5e45ab3ed07756f815
Dariusz Michaluk [Mon, 3 Aug 2015 13:52:58 +0000 (15:52 +0200)]
Fix lxcpp tests
[Bug] N/A
[Cause] N/A
[Solution] N/A
[Verification] N/A
Change-Id: Idf5939f96ffb6af7380cfc5fe216361b53402801
Jan Olszak [Wed, 29 Jul 2015 13:06:02 +0000 (15:06 +0200)]
lxcpp: setns wrapper
[Feature] Added setns wrapper
Added Namespace type
[Cause] N/A
[Solution] N/A
[Verification] N/A
Change-Id: Ib07374bb07183dba604053139d624bdf2a850268
Lukasz Kostyra [Tue, 28 Jul 2015 07:42:48 +0000 (09:42 +0200)]
Add test for Lock/UnlockQueue API
[Feature] Test for Lock/UnlockQueue API
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run tests
Change-Id: Id8a88af8459a63e61db06668d4b4a57b2578b4e2
Krzysztof Dynowski [Thu, 23 Jul 2015 14:27:57 +0000 (16:27 +0200)]
Make vasum-cli arguments shorter/nicer with autocomplete, rename tool vasum-cli to vsm
[Feature] Shorter and nicer arguments for command line tool
[Cause] Messy underscore, too many commands
[Solution] More generic commands, shorter, easier to enter names
[Verification] Build, install, use vsm with various arguments
Try autocompletion for arguments
Change-Id: I2e8d1bff3a5dcf96df1250b29b8df55c8f23171d
Lukasz Pawelczyk [Wed, 29 Jul 2015 10:03:08 +0000 (12:03 +0200)]
Fix pkg-config files from returning wrong relative paths.
[Bug] The pkg-config files were using wrong relative paths
[Cause] CMAKE_INSTALL_* variables are relative, cmake could handle
them internally for INSTALL and similar, but for
pkgconfig understands them literally.
[Solution] Use absolute paths everywhere.
[Verification] Check the content of *.pc files after make install.
Change-Id: I2a14d0f9ddc45238be7e8d487d186df1877730bd
Jan Olszak [Tue, 28 Jul 2015 11:12:10 +0000 (13:12 +0200)]
lxcpp: Added logger, tests and changed exceptions
[Feature] Using libLogger in lxcpp in an example clone function.
Set up unit-tests
Changed exception names
[Cause] N/A
[Solution] N/A
[Verification] N/A
Change-Id: I039bf3e17d791ccf1a18f17a9b2a180ee2081722
Dariusz Michaluk [Mon, 27 Jul 2015 14:45:35 +0000 (16:45 +0200)]
Remove debug logs in release build.
[Bug] Remove debug logs in release build.
[Cause] N/A
[Solution] N/A
[Verification] Build release/debug, run server.
Change-Id: Id34991a45e0fbee8edddfea10b64f69809141af3
Lukasz Pawelczyk [Mon, 27 Jul 2015 09:20:37 +0000 (11:20 +0200)]
Hide VsmZone and VsmNetdevType structs from API
[Feature] N/A
[Cause] Make it easier to change them in the future without
breaking the ABI. Also remove duplicate related API
function from the code.
[Solution] N/A
[Verification] N/A
Change-Id: Ib0ec7374ee0f94cd88e2998e9d10f18ae094ee98
Jan Olszak [Mon, 27 Jul 2015 13:23:38 +0000 (15:23 +0200)]
Added lxcpp's license
[Feature] lxcpp is on LGPL 2.1 license
[Cause] N/A
[Solution] N/A
[Verification] N/A
Change-Id: Ia1916f4ba8ea815467ea958020db401f46cfa5cb
Dariusz Michaluk [Fri, 17 Jul 2015 13:27:57 +0000 (15:27 +0200)]
Various changes relating to build on Ubuntu and Fedora Linux.
[Bug/Feature] Various changes relating to build on Ubuntu and Fedora Linux.
[Cause] N/A
[Solution] N/A
Verification] Build, run server, run tests.
Change-Id: Ie9f8c05a0de96b0dc07d506657a48f6dd1b074b4
Mateusz Malicki [Thu, 23 Jul 2015 13:48:09 +0000 (15:48 +0200)]
lxcpp skeleton
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] N/A
Change-Id: I1950967edc720ad9b81301daa4e1b60ff8c3b41d
Dariusz Michaluk [Mon, 27 Jul 2015 07:41:42 +0000 (09:41 +0200)]
Fix build break
[Bug] C++ style comments are not allowed in ISO C90
[Cause] N/A
[Solution] N/A
[Verification] Build
Change-Id: Iab690af9fc085c0707aacb83b901c3efde5ae638
Jan Olszak [Fri, 24 Jul 2015 12:28:35 +0000 (14:28 +0200)]
Fix build break in clang
[Feature] N/A
[Cause] No new line in vasum-client.h
[Solution] N/A
[Verification] N/A
Change-Id: Ic4cf72d42a173edeb0a6d450c1f2aad12bb22a59
Jan Olszak [Fri, 24 Jul 2015 09:25:51 +0000 (11:25 +0200)]
Added libvasum-client's documentation
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] ./generate_documentation.sh and verify
Change-Id: I9ec902cce2b29ca2d81fa8ca40db11977e0f3c3f
Mateusz Malicki [Fri, 17 Jul 2015 14:49:43 +0000 (16:49 +0200)]
Clean up zones root path
[Feature] Clean up zones root path (according to cleanUpZonesPath flag)
[Cause] N/A
[Solution] Added cleanUpZonesPath to daemon.conf which tells whether
to remove unknown files from the zonesPath;
Added (vsm_)clean_up_zones_root to cli and client
[Verification] Build, install, create files in zonesPath,
run vasum-server with different flag value, check if
zonesPath is as it should; execute command
Change-Id: I64a1656ef05ccd5fd7e83a48cd50234e2e6bd4b4
Jan Olszak [Thu, 23 Jul 2015 12:28:21 +0000 (14:28 +0200)]
Added libLogger's documentation
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] ./generate_documentation.sh and verify
Change-Id: I53a75f358e0e9182f51334544cb5da9722182cf9
Lukasz Kostyra [Thu, 23 Jul 2015 06:06:23 +0000 (08:06 +0200)]
Modify generate_documentation.sh
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] Run script, output html dir should be in doc directory.
Run without doxygen installed, should exit with an error message.
Change-Id: Ibfc0026da771ba1415f034ce8e81eaeb1deab0c2
Lukasz Kostyra [Wed, 22 Jul 2015 13:34:12 +0000 (15:34 +0200)]
Enable file path stripping in Doxygen
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] ./generate_documentation.sh, access file's doc and check page title
Change-Id: I9f05262a5ec73327492aad722b15393335fc46c1
Lukasz Kostyra [Mon, 20 Jul 2015 11:18:41 +0000 (13:18 +0200)]
Fix Doxygen warnings
[Bug] Doxygen warnings during documentation generation.
[Cause] Some docblocks were incomplete.
[Solution] Fix warnings.
[Verification] Build, run tests, ./generate_documentation.sh. During doc
generation there will be warnings related to
command-line-interface.hpp stating "no matching file memeber".
This is a Doxygen bug and the only possible fix is to
replace Args typedef with std::vector<std::string>.
Change-Id: I1523dc83a5f5e9902e5983ac5b95497d61f71cfc
Jan Olszak [Wed, 22 Jul 2015 13:18:09 +0000 (15:18 +0200)]
Main page in Markdown format
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] ./generate_documentation.sh and verify
Change-Id: I6b4f55de7f48bb66b3dd40a2313b6137919f028f
Jan Olszak [Wed, 22 Jul 2015 11:59:22 +0000 (13:59 +0200)]
Added favicon to the documentation
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] ./generate_documentation.sh and verify
Change-Id: I12145caf7a4e303dc51472ea1cb01a928561c8d7
Jan Olszak [Tue, 14 Jul 2015 12:59:32 +0000 (14:59 +0200)]
Dispatching in the main thread
[Feature] Removed Server's ThreadDispatcher
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run tests
Change-Id: I100f8b370baeca78cbfcfdc803e360ebc40fd0ca
Lukasz Kostyra [Tue, 14 Jul 2015 13:37:18 +0000 (15:37 +0200)]
Update Doxy CSS
[Feature] Doxy CSS updated with our custom documentation pages layout.
[Cause] More eye-pleasant CSS needed.
[Solution] Manually fix previously extracted CSS.
[Verification] Generate docs and see if they are OK.
Change-Id: Ia88865ec399fee8e336a2c7e9bf74546d659f61d
Lukasz Kostyra [Tue, 14 Jul 2015 08:22:32 +0000 (10:22 +0200)]
Update doxygen.cfg file, extract its HTML/CSS files
[Feature] Doxygen cfg file was updated to 1.8.6
[Cause] Warnings during parsing
[Solution] Upgraded doxygen cfg with doxygen -u
[Verification] Generate documentation - no warnings related to deprecated
doxygen.cfg parameters should occur (these appeared at the very
beginning of parsing; keep in mind - Vasum comments do produce
warnings and will be fixed further on).
The commit additionally extracts default HTML header and footer, and default
CSS schema. These are kept in doc folder together with doxygen.cfg. Doxygen was
set up to use these files when generating documentation.
Change-Id: Ie8f78f0617e42de5bcaa6ce75b46cb436d3c8fd3
RomanKubiak [Thu, 16 Jul 2015 11:43:08 +0000 (13:43 +0200)]
Added file and syslog backends
[Feature] New logger backends (file and syslog)
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run tests
Change-Id: I0de1f4e121ca5ff24b5a0f148015afda7dc9e503
Jan Olszak [Mon, 20 Jul 2015 13:02:46 +0000 (15:02 +0200)]
IPC: Cleaned up EventPoll usage
[Feature] Adding and removing fds to EventPoll
is guarded internaly by Processor and Acceptor
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run tests
Change-Id: I97999591b6c586159698f4f0231740c3c52d5cc5
Dariusz Michaluk [Tue, 23 Jun 2015 15:11:13 +0000 (17:11 +0200)]
Add console_zone to cli
[Feature] Launch a console for the specified zone.
[Cause] N/A
[Solution] Add console_zone to cli.
[Verification] Build, run server,
vasum-cli create/start/console/shutdown zone.
Change-Id: I093837d6807931163321812a2bcba467a5a9f27e
Mateusz Malicki [Wed, 15 Jul 2015 14:26:20 +0000 (16:26 +0200)]
Fix: cli: error handling
[Bug] Not all errors are propagated up
[Cause] Not all errors has non empty status message
[Solution] Throw exception regardless of the status messages
[Verification] Build, install, run vasum-cli
Change-Id: Idcbfdf519f1834b9046d3cdd59a7293cae629e3f
Jan Olszak [Wed, 15 Jul 2015 12:54:10 +0000 (14:54 +0200)]
Ignoring SIGTERM
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run tests
Change-Id: Ib81c67dc0738db5ef4713d6d8b2c2376a8323800
Mateusz Malicki [Fri, 10 Jul 2015 12:08:06 +0000 (14:08 +0200)]
Support vasum-cli to be a script interpreter (2/2)
[Feature] vasum-cli as script interpreter
[Cause] n/a
[Solution] file/pipe processing
[Verification] Build, run vasum-cli script,
vasum-cli -f script, cat script|vasum-cli
Change-Id: Ib2a1e4fc5fbecdac206063b6d3dd2a95b5923196
Krzysztof Dynowski [Wed, 1 Jul 2015 15:29:32 +0000 (17:29 +0200)]
Support vasum-cli to be a script interpreter (1/2)
[Feature] vasum-cli as script interpreter
[Cause] n/a
[Solution] file/pipe processing
[Verification] Build, run vasum-cli script, vasum-cli -f script, cat script|vasum-cli
Change-Id: I6b8ff93fb359e429119e120d93a0851e2ae7e72e
Jan Olszak [Mon, 13 Jul 2015 08:31:03 +0000 (10:31 +0200)]
SignalFD tests
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run tests
Change-Id: I9dbcd567c958c66e826785f77912f60af8f521d1
Jan Olszak [Tue, 7 Jul 2015 11:13:45 +0000 (13:13 +0200)]
Handling signals with signalfd
[Feature] Synchronous signal handling
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run tests
Change-Id: I5a31fcb9929a3d8d36c1ea275c089412687478d5
Mateusz Malicki [Mon, 6 Jul 2015 08:39:24 +0000 (10:39 +0200)]
Removed unused code (ZONE_CONNECTION macro)
[Bug] Unused code
[Cause] There is no connection to zone
[Solution] Remove ZONE_CONNECTION macro and related code
[Verification] Build
Change-Id: I805372a08ddd3507cbe6bfaeeca968560eb593e6
Jan Olszak [Mon, 6 Jul 2015 09:58:10 +0000 (11:58 +0200)]
Moved dispatching to Server
[Feature] Dispatcher can be used outside IPC.
[Cause] Will be needed to process signalfd
[Solution] N/A
[Verification] Build, install, run tests
Change-Id: I17298da5e4758bbf0fa266bcf896f464df29c9a3
Mateusz Malicki [Mon, 6 Jul 2015 13:25:25 +0000 (15:25 +0200)]
Fix method signature (add override)
[Bug] Can't compile with clang 3.6
[Cause] Missing override in method signature
[Solution] N/A
[Verification] Compile with clang.
Change-Id: Iac6094321be0571ccb39bebc3e911665abd9053e
Mateusz Malicki [Mon, 6 Jul 2015 09:41:16 +0000 (11:41 +0200)]
Fix doxygen comment
[Bug] Can't compile with clang 3.6
[Cause] Bad format of doxygen comment (command-line-interface.hpp)
[Solution] N/A
[Verification] Compile with clang.
Change-Id: If8a394d67ac37f402802a23bdf990f1ea70306d2
Lukasz Pawelczyk [Mon, 22 Jun 2015 12:03:15 +0000 (14:03 +0200)]
Interactive mode and other improvements to vasum-cli tool
[Feature] These features have been implemented/updated:
- interactive mode
- persistent connection during interactive mode
- better help
- simple mode for cli auto-completion
The interactive mode allows to make full use of queue
lock/unlock commands. They can also be easily tested
with it.
[Cause] n/a
[Solution] n/a
[Verification] Run vasum-cli and executed several commands.
Tested auto completion. Tested lock/unlock queue.
Change-Id: If623559c9250bf480cc600ba89c2d5fe02137a18
Krzysztof Dynowski [Mon, 29 Jun 2015 14:13:12 +0000 (16:13 +0200)]
Adjust to coding style rules
[Feature] package includes in double quotes
[Cause] n/a
[Solution] replace tiangle brackets to double quotes
[Verification] Build
Change-Id: I7fc5815a3213566172dc8561240f463d610e48ea
Dariusz Michaluk [Mon, 22 Jun 2015 08:59:52 +0000 (10:59 +0200)]
Various changes relating to Fedora Linux support.
[Bug/Feature] Fix vasum-cli create_zone (add zone template name parameter).
Default zone template depends on target platform.
Create zones data directory.
Add fedora zone template.
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run tests, run daemon,
create/start/shutdown/destroy zone.
Change-Id: I63b4b6a60c85b826492e13d016f67e489cefb36c
Lukasz Pawelczyk [Thu, 18 Jun 2015 13:21:38 +0000 (15:21 +0200)]
Implement a Lock/Unlock Queue API calls.
[Feature] Calls that make it possible to lock a queue exclusively
to one client (IPC/DBUS) which can then order few calls
in a row with a guarantee that no other client will
interrupt.
[Cause] n/a
[Solution] n/a
[Verification] Built, installed, run tests. Also see below.
Additional features implemented in this commit to support the above:
- DBus client disconnected notification. Adds a new callback to
registerObject() that's called when a client that previously talked to
the server gets disconnected.
- ZoneManager level client disconnect notification using the
aforementioned DBus and already implemented IPC functionalities.
- Changed SwitchToDefault from signal to a method so we can return an
error code when the queue is locked.
- MethodResultBuilder's getID() call that returns ipc independent
identifier that client connections can be identified with (using
getPeerID and getPeerName from IPC and DBus specific classes
respectively).
- mGuard fixed in the DbusConnection class. Now it really does protect
mConnection and mNameID as well as newly introduced mWatchedClients.
- Various half-related fixes/changes here and there (whitespaces,
duplicate definition of PROXY_CALL in the DBus interface, etc).
There are no tests in this commit for the DBus features and the
Lock/Unlock queue. They will follow in the later commits.
To somewhat test the disconnect notifications (both, DBus level and
ZoneManager level) one can connect to the server using appropriate APIs
and watch the DEBUG/TRACE logs. This can be achieved using the following
commands:
$ dbus-send --system --dest=org.tizen.vasum.host \
--type=method_call --print-reply \
/org/tizen/vasum/host \
org.tizen.vasum.host.manager.GetZoneIds
$ vasum-cli get_zone_ids
WARNING: this commit breaks API/ABI of libSimpleDbus
Change-Id: Ic0ed2371e563c34340ad41d66dd943a1abc8eb48
Mateusz Malicki [Wed, 24 Jun 2015 14:38:03 +0000 (16:38 +0200)]
Optimization turned off when compiling with coverage support
[Feature] Better coverage report
[Cause] Optimization can broke coverage report
[Solution] Turn off optimization
[Verification] Build with 'CCOV' target, run, generate report
Change-Id: I13f04d16f6292e5def30a6af75c5fcbc5038fde1
Krzysztof Dynowski [Thu, 25 Jun 2015 08:52:35 +0000 (10:52 +0200)]
Wrapper: send/recv socket fd - based on public domain code
[Bug/Feature] Protex reported copy of code from LXC sources
[Cause] Copied from vasum old api
[Solution] Follow public domain examples from "Unix Network Programming"
[Verification] Next protex report
Change-Id: I13163a3e0ef68d816ad194e515cab28629a7291f
Lukasz Kostyra [Tue, 23 Jun 2015 09:28:51 +0000 (11:28 +0200)]
Fix Klocwork issues
[Bug] Issues reported by Klocwork
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run tests
Change-Id: I745cccedceff96fc3b1f475da4308f17775a6d24
Krzysztof Dynowski [Fri, 19 Jun 2015 12:49:30 +0000 (14:49 +0200)]
Check vasum runtime - rename vasum-check-env to vasum-check-config
[Bug/Feature] naming convention
[Cause] N/A
[Solution] rename
[Verification] N/A
Change-Id: I6fb89a9378da7d4c04c0cae74935fdf67df5d3d6
Lukasz Kostyra [Tue, 16 Jun 2015 10:56:18 +0000 (12:56 +0200)]
Finish CreateFile API
[Feature] N/A
[Cause] Missing API
[Solution] Add missing functions in ZonesManager and in Communication
[Verification] Build, install, run tests
Change-Id: I417e1deeca2effcdb772189045263d0c9dd22de7
Dariusz Michaluk [Tue, 16 Jun 2015 12:39:42 +0000 (14:39 +0200)]
Add wrapper for lxc-fedora template
[Feature] Add wrapper for lxc-fedora template
[Cause] N/A
[Solution] N/A
[Verification] Build, create/start/shutdown/destroy zone.
Change-Id: Iaa071f19dedfb7406d576858d8c7be2600b1e077
Dariusz Michaluk [Thu, 18 Jun 2015 07:43:58 +0000 (09:43 +0200)]
Don't print LOGS messages when log level is greater than TRACE
[Bug] LOGS messages was always printed
[Cause] N/A
[Solution] N/A
[Verification] Build, run `vasum-server -r` and `vasum-server -r -l TRACE`
Change-Id: Iec4fdd5d40a3920a51afae0a687387cb71b85ea2
Jan Olszak [Wed, 17 Jun 2015 11:25:08 +0000 (13:25 +0200)]
Vasum's logo and icons
[Bug] N/A
[Cause] N/A
[Solution] N/A
[Verification] N/A
Change-Id: I65f0288aa398674b4c1307f9f52255218caf7922
Mateusz Malicki [Tue, 9 Jun 2015 14:14:42 +0000 (16:14 +0200)]
Remove HostIpcConnection class
[Bug] Unnecessary HostIpcConnection class (ipc wrapper)
[Cause] N/A
[Solution] N/A
[Verification] run ClientSuite tests
Change-Id: Ic2a3973593e3bec1d64715976c44ec460f66ee21
Mateusz Malicki [Wed, 3 Jun 2015 13:58:18 +0000 (15:58 +0200)]
Add vsm_get_event_fd and vsm_enter_eventloop
[Feature] Provide possibility to implement custom event loop for
user of vasum client library
[Cause] Integration with other services
[Solution] Possibility to fetch event fd and run event loop
[Verification] run ClientSuite tests
Change-Id: Ic47e5de8bfd09889330d97d35d4c9ef47f238953
Jan Olszak [Mon, 8 Jun 2015 14:17:16 +0000 (16:17 +0200)]
Create File in LxcZone
[Feature] Create files in zones
Pass file descriptors to those files
Api definition
[Cause] N/A
[Solution] N/A
[Verification] Build, run all tests
Change-Id: I9780b8922fac2548bae642b0e732dd96998996ab
Lukasz Pawelczyk [Mon, 15 Jun 2015 11:52:25 +0000 (13:52 +0200)]
Unlock the latch even in the case of an exception
[Feature] N/A
[Cause] If an exception is thrown during execute() the calling
thread's latch will never be unlocked.
[Solution] Unlock the latch after the whole try/catch.
[Verification] Built, installed, run tests
Change-Id: I2891d83f4f3459a2d2d60cdc4d2986e37894c959
Krzysztof Dynowski [Wed, 3 Jun 2015 12:45:26 +0000 (14:45 +0200)]
Check vasum runtime environment, provide utility to check kernel config
[Bug/Feature] check vasum enviroment and kernel config
[Cause] N/A
[Solution] server option to check runtime, script based on lxc-checkconfig
[Verification] Build, install on target, run server and script
Change-Id: I28b6982694e7918cad31e59cee35b5872e554246
Lukasz Pawelczyk [Wed, 10 Jun 2015 16:27:02 +0000 (18:27 +0200)]
Make all the API calls queue together so we guarantee order
[Bug] Some API calls were async hence the sync ones could have
been run before them. There was no guarantee for the
calls to be ordered the way they've been requested.
[Cause] N/A
[Solution] Add sync calls to the same queue as the async ones so we
can guarantee their order of execution.
[Verification] Built, installed, run tests.
Change-Id: Iab59552d46689fb86576539012004107f4e675b3
Lukasz Kostyra [Wed, 10 Jun 2015 11:25:25 +0000 (13:25 +0200)]
Remove ZoneAdmin class
[Feature] Removed ZoneAdmin class
[Cause] Unneeded layer between Zone class and LXC Zone
[Solution] Remove ZoneAdmin class, move its functionality to Zone class
[Verification] Build, install, run tests
Change-Id: Id539ee2596c948f4cac6a0b9dff198d3d2b42c75
Lukasz Pawelczyk [Tue, 9 Jun 2015 15:30:14 +0000 (17:30 +0200)]
Fix for responding to a first request after socket activation
[Bug] When socket activated the first request might not be
properly handled because all the callback might not have
registered yet.
[Cause] N/A
[Solution] Delayed handling requests until all the callbacks have
been registered.
[Verification] Built, installed, run tests.
Did several tries with triggering socket activation:
1. systemctl start vasum.service
2. vasum-cli create_zone test
3. systemctl stop vasum.service
4. vasum-cli get_zone_ids
5. observe no error and list of zones should show 'test'
6. goto 3
Change-Id: I6de9742959d32afe68f496246065d3befc823955
Mateusz Malicki [Wed, 10 Jun 2015 10:11:56 +0000 (12:11 +0200)]
Remove unused function
[Bug] Compile error
[Cause] capget is static unused function
[Solution] Remove capget
[Verification] Compile with clang
Change-Id: I3fb8e4b3de7f4bf4a02d3cb1c96009c3beb262c7
Lukasz Pawelczyk [Tue, 9 Jun 2015 13:18:29 +0000 (15:18 +0200)]
Fix bash completion in case of user grep color aliases
[Bug] Mitigate user grep aliases that use colors
[Cause] N/A
[Solution] Add --color=never to grep
[Verification] Checked that bash completion works
Change-Id: Ifffaf2e931f1cd573c6629a1932aca28b924509a
Lukasz Kostyra [Tue, 9 Jun 2015 08:55:03 +0000 (10:55 +0200)]
Fix CMake variables
[Bug] * systemd service/socket files should be in /usr/local/lib, while
compiled libraries should reside in /usr/local/lib64 on 64-bit
systems.
* Two sockets were created - one by systemd service, one by vasum
IPC mechanisms.
[Cause] N/A
[Solution] Rename vasum-ipc.socket to vasum.socket
Correct variables regarding library and systemd file locations
[Verification] Build, install, run tests, run vasum-cli, check file locations and
service files.
Change-Id: I54681eaebd00b1aec547617a2ea51b0675c24ec3
Lukasz Kostyra [Tue, 26 May 2015 06:52:19 +0000 (08:52 +0200)]
Remove useless callback layer from Host*Connection
[Bug] Host*Connection classes had redundant callback layer.
[Cause] N/A
[Solution] Make Host*Connection objects aware of ZonesManager.
Remove unneeded callbacks.
[Verification] For both with and without Dbus:
* Build
* Run tests
* Make sure, that vasum-cli works
Change-Id: I8fd76d279731efdf201e797f2ef7600aed355aaa
Dariusz Michaluk [Fri, 29 May 2015 12:44:12 +0000 (14:44 +0200)]
Various changes relating to build on Fedora Linux.
[Bug/Feature] Support different versions of json-c.
Unify installation paths.
Fix compiler warnings.
Support different platform type in RPM spec file.
Small changes in deamon and service configuration.
[Cause] N/A
[Solution] N/A
[Verification] Build, run tests, run server on Tizen and Fedora.
Select platform type with --define 'platform_type FEDORA or TIZEN'
Change-Id: I6ef85e9605d2069701ee68dd8e8946f0346387f5
Jan Olszak [Mon, 1 Jun 2015 14:11:54 +0000 (16:11 +0200)]
File descriptor passing via IPC
[Feature] FD passing via Unix socket
[Cause] N/A
[Solution] N/A
[Verification] Build, run all tests
Change-Id: I1683a7e99a104d5dbdd5c0c56913753c9bdd3cf2
Jan Olszak [Tue, 2 Jun 2015 12:16:43 +0000 (14:16 +0200)]
Removed Glib connected functions from API
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] Build, run all tests
Change-Id: I3fe5e789535fcb53ee5d223172cb63bd44fb962c
Jan Olszak [Wed, 27 May 2015 16:48:47 +0000 (18:48 +0200)]
Small documentation for github
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] N/A
Change-Id: Ia7beba020ae92619e3639ee70af65794d2b662a1
Jan Olszak [Wed, 27 May 2015 13:30:33 +0000 (15:30 +0200)]
Fix configuration script permissions
[Feature] N/A
[Cause] N/A
[Solution] LXC templates have x permission
[Verification] Build, run all tests
Change-Id: I6a2486a588f8a28dfe84f187a4889f0f9500e2a6
Krzysztof Dynowski [Mon, 25 May 2015 11:13:32 +0000 (13:13 +0200)]
Vasum wrapper #8: implement socket related functions, obsolete vasum-daemon
[Bug/Feature] socket not opens, rpm install conflict
[Cause] N/A
[Solution] #8 implement socket creation, etc.
[Verification] Build, install on target, check journal
Change-Id: I2c6dd5e40a08bda3722167c4e1f06b60bb53e7dc
Lukasz Kostyra [Wed, 6 May 2015 10:16:49 +0000 (12:16 +0200)]
Remove libcap_ng and replace it with syscalls
[Feature] libcap_ng is removed
[Cause] N/A
[Solution] Replace libcap_ng with syscalls
[Verification] Build, install, run vasum-server without root and check if all
needed capabilities were kept by the process.
Change-Id: Idab4c7b579c6541d941e8c9e9c792427428f8fe5
Mateusz Malicki [Tue, 19 May 2015 16:38:11 +0000 (18:38 +0200)]
Fix GetZoneIdByPidTestMultiple, GrantRevoke
[Feature] GetZoneIdByPidTestMultiple, GrantRevoke some times fails
[Cause] Timeout was too small
[Solution] Increase timeout
[Verification] Build, install, run tests
Change-Id: Id191c1a6443e19f729dfc90c9a3c8c34dc4166e3
Mateusz Malicki [Thu, 21 May 2015 15:25:22 +0000 (17:25 +0200)]
Fix SocketSuite/SystemdSocket
[Bug] Prevent from run vasum-socket-test.service in qemu
[Cause] N/A
[Solution] Remove ConditionVirtualization=no
[Verification] Build, install on emulator, run SocketSuite/SystemdSocket test
Change-Id: I4fc0c9da2a4ca55878acec6203caab3674d94d02
Krzysztof Dynowski [Wed, 20 May 2015 15:41:52 +0000 (17:41 +0200)]
Vasum wrapper #7, add functions introduced in last vasum old API, link to Ipc
[Bug/Feature] latest image not works with wrapper
[Cause] last vasum old API introduced new functions
[Solution] #7 implement those new functions
[Verification] Build, install on target, check journal
Change-Id: I95d46157d419e0886beb00574bc94a1bfe316677
Mateusz Malicki [Thu, 21 May 2015 15:05:16 +0000 (17:05 +0200)]
Fix SwitchToDefault and AllowSwitchToDefault
[Bug] SwitchToDefault and AllowSwitchToDefault some times fails
[Cause] Signal handler are not set
[Solution] Ensure signal handler propagate (wait)
[Verification] Build, install on emulator,
run ZonesManagerSuite/SwitchToDefault and
ZonesManagerSuite/AllowSwitchToDefault tests (multiple times)
Change-Id: I3c9c2549903cebcc30496af3ccb427c1186d1b23
Mateusz Malicki [Thu, 21 May 2015 14:12:53 +0000 (16:12 +0200)]
Fix IPCSuite/WriteTimeout
[Bug] IPCSuite/WriteTimeout some time fails
[Cause] To large write timeout and too small response time
- checking timeout when response has already been
callSync only sometimes takes into account the serialization time
[Solution] Increase response time. Wait for sending till timeout countdown start
[Verification] Build, install on emulator, run IPCSuite/WriteTimeout test (multiple times)
Change-Id: Ic9e814a0ae5cb85a769f0398d5126b0b67f5c626
Dariusz Michaluk [Wed, 20 May 2015 09:46:33 +0000 (11:46 +0200)]
Add vsm_get_zone_rootpath API function
[Bug/Feature] Introduce new API function: vsm_get_zone_rootpath
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run tests
Change-Id: Ia4f9f6701f20d6a32878bf13c59a8ad9ade9a9bb
Mateusz Malicki [Wed, 20 May 2015 09:03:39 +0000 (11:03 +0200)]
Fix building on x86_64
[Bug] Removed unneeded cast
[Cause] Lose precision cast
[Solution] N/A
[Verification] Build on x86_64
Change-Id: I2302eaefed4f0c94f29ad94468ff9d83fa15166e
Mateusz Malicki [Wed, 20 May 2015 08:58:50 +0000 (10:58 +0200)]
Add libsystemd-daemon build dependencies
[Bug] LibIpc need libsystemd-daemon
[Cause] N/A
[Solution] N/A
[Verification] Build, install on target
Change-Id: I6da84631ed75e80d8e0f417dd4aacdc51f797a11
Lukasz Kostyra [Wed, 20 May 2015 09:30:54 +0000 (11:30 +0200)]
Fix critical bug in environment.cpp
[Bug] "Namespaced" word was misspelled in "passNamespacedFd" function declaration,
definition and usage. Assuming someone does not use syntax recognition,
it could case critical errors during compilation and a lot of confusion.
[Cause] Author of passNamespacedFd function made a typo.
[Solution] Replace "Nemaspaced" with correct version - "Namespaced".
[Verification] Build, install, run tests.
Change-Id: I3df106ee8e275210af43de572a9c69ba0a220a56
Krzysztof Dynowski [Mon, 18 May 2015 13:05:57 +0000 (15:05 +0200)]
Vasum wrapper #6, implement vsm_declare_*, add logs, missing functions
[Bug/Feature] dummy implementation of vsm_declare_link,vsm_declare_file,vsm_declare_mount
[Cause] N/A
[Solution] #6 implement vsm_declare_link,vsm_declare_file,vsm_declare_mount
[Verification] Build, install on target
Change-Id: I522233d4b02a9af8d2c282e6a04cd96be85920df
Dariusz Michaluk [Tue, 19 May 2015 12:33:35 +0000 (14:33 +0200)]
Fix ip command
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run server.
Change-Id: Ic28e6ea45c80fc48934ee911f7f5cee68cfcbb87
Dariusz Michaluk [Mon, 18 May 2015 14:05:25 +0000 (16:05 +0200)]
Replace brctl with ip (remove bridge-utils dependency)
[Feature] N/A
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run server.
Change-Id: I8acbaff403d611df82bbebaef5d6281defb2acf8
Dariusz Michaluk [Wed, 13 May 2015 14:19:26 +0000 (16:19 +0200)]
Cleanup daemon and zones configuration
[Feature] Move unit tests configs to one directory.
Remove unnecessary unit tests configs.
Remove zoneTemplatePrefix from daemon config (zoneTemplateDir is used instead).
Rename some configs.
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run tests, run server.
Change-Id: Iabed6b7bfc1999296bcea89269195867d804c9ac
Mateusz Malicki [Thu, 14 May 2015 12:32:52 +0000 (14:32 +0200)]
libIpc separated from vasum #2/2
[Feature] libIpc separated from vasum;
[Cause] N/A
[Solution] Some header files from utils are copied to libIpc-devel rpm package
(they can conflict with libSimpleDbus-devel header files)
[Verification] Build, install, run tests
Change-Id: Ic89a6e1d2a7a4cbb48112eef226b11cd10eb7987
Mateusz Malicki [Thu, 14 May 2015 10:31:27 +0000 (12:31 +0200)]
libIpc separated from vasum #1 (code refactor)
[Feature] Code refactor
a) moved vasum::utils namspace to utils namespace
b) moved vasum::ipc namespace to ipc namespace
c) moved vasum::epoll namespace to ipc::epoll namespace
d) moved common/epoll source dir to common/ipc/epoll
e) moved UtilsException to utils namespace
f) moved getSystemErrorMessage to utils/exception.hpp
[Cause] N/A
[Solution] N/A
[Verification] Build, install
Change-Id: I2cda58decfdb30ec9a27f7cb65940ae8dbc7edf3
Krzysztof Dynowski [Wed, 13 May 2015 13:32:25 +0000 (15:32 +0200)]
Vasum wrapper #5, fix exported function list
[Bug/Feature] exported funcs not visible
[Cause] missing API keyword in declaration
[Solution] #5 add API keyword
[Verification] Build, build old clients, install on target
Change-Id: Idd408bb59f9421d43b153117aa3d825610722283
Dariusz Michaluk [Wed, 13 May 2015 11:56:12 +0000 (13:56 +0200)]
Fix vsm_create_zone timeout
[Feature] Greater timeout for vsm_create_zone
[Cause] Timeout was too small
[Solution] N/A
[Verification] Start vasum on odroid, create zone
Change-Id: Ic9015f7987c986267d47b5ce55d04a9749baf85c
Dariusz Michaluk [Tue, 12 May 2015 14:19:01 +0000 (16:19 +0200)]
Rename all not associated with LXC stuff.
[Bug/Feature] Rename all not associated with LXC stuff.
[Cause] N/A
[Solution] N/A
[Verification] Build, install, run tests.
Change-Id: I40bf4156e5148dc3a6f3d81bc2e7edfe81c56596
Krzysztof Dynowski [Tue, 12 May 2015 13:05:13 +0000 (15:05 +0200)]
Vasum wrapper #4, cleanup
[Bug/Feature] Cleanup folder structure
[Cause] wrapper mixed with client
[Solution] #4 move wrapper sources to separate folder
[Verification] Build, build old clients
Change-Id: I467e12d996e2c23ce0e46182c7e3d74ea2943ada
Krzysztof Dynowski [Tue, 12 May 2015 07:18:14 +0000 (09:18 +0200)]
Vasum wrapper #3, fixes, API update
[Bug/Feature] Old vasum client not compiling with wrapper
[Cause] missing struct defs
[Solution] #3 update wrapper API (use correct vasum.h)
[Verification] Build, build old clients
Change-Id: I97f21d77ed6b56d4e046c577521f839b74c31779
Dariusz Michaluk [Mon, 11 May 2015 14:22:53 +0000 (16:22 +0200)]
Cleanup RPM spec file. Fix RPMLINT errors.
[Bug/Feature] Cleanup RPM spec file. Fix RPMLINT errors.
[Cause] N/A
[Solution] N/A
[Verification] Build, install, uninstall.
Change-Id: I063dd412b1999b9cda5e2cdf3d62ee2282abca1b
Mateusz Malicki [Wed, 6 May 2015 09:38:03 +0000 (11:38 +0200)]
Client timeout fixes: vsm_start_zone, vsm_shutdown_zone, vsm_lock_zone
[Feature] Greater timeout for vsm_start_zone, vsm_shutdown_zone,
vsm_lock_zone, vsm_destroy_zone
[Cause] Timeout was too small
[Solution] N/A
[Verification] Start vasum on odroid, start zone, lock zone,
shutdown zone, destroy zone
Change-Id: I22c080565736abeb95a1e57653777c7d0863c7b3
Mateusz Malicki [Mon, 11 May 2015 10:28:55 +0000 (12:28 +0200)]
Doxygen fixes
[Bug] Doesn't compile with clang
[Cause] Doxygen parse errors
[Solution] Fix doxygen comments
[Verification] Compile with clang 3.5.1
Change-Id: Ifa43326293b27ad45c2f3e217f4c09d175cc5c15