platform/core/security/vasum.git
8 years agolxcpp: cgroups configration (part 3) 97/50297/6
Krzysztof Dynowski [Fri, 23 Oct 2015 23:33:43 +0000 (01:33 +0200)]
lxcpp: cgroups configration (part 3)

[Feature]       Control-groups configuration for containers
[Cause]         N/A
[Solution]      N/A
[Verification]  build, install, run unit tests

Change-Id: I5a0e1403d3524973e6d2eed02118a213f3a764a4

8 years agoconfig: kvstore visitors refactoring 58/49458/21
Pawel Kubik [Fri, 9 Oct 2015 11:18:13 +0000 (13:18 +0200)]
config: kvstore visitors refactoring

[Feature]       kvstore and kvjson visitors refactoring
[Cause]         N/A
[Solution]      1. All KVStore methods accepting non-string arguments has
                been moved to the FromKVStoreVisitors.
                2. FromKVStoreIgnoringVisitor has been added for loading
                incomplete config from KVStore.
                3. FromKVJsonVisitor has been removed. As replacement
                FromKVStoreIgnoringVisitor is now called right after
                FromJsonVisitor.
[Verification]  Build, install, run tests

Change-Id: I9d77388830c6e2914b1e1d91dcad211c6ae7059e

8 years agoUnit tests fail randomly, investigation (no fix) 11/50111/6
Krzysztof Dynowski [Fri, 23 Oct 2015 14:22:04 +0000 (16:22 +0200)]
Unit tests fail randomly, investigation (no fix)

[Feature/Bug]   Failure on ServerSuite.ConstructorDestructor
[Cause]         N/A
[Solution]      Make distinct logs too investigate the reason
[Verification]  build, install, run unit tests

Change-Id: I463b206bf75b9ffd9ae41d5a048712a3c6ac4762

8 years agoipc: Nonblocking callAsync with empty callback 31/50531/2
Jan Olszak [Thu, 29 Oct 2015 11:52:58 +0000 (12:52 +0100)]
ipc: Nonblocking callAsync with empty callback

[Feature]       It's possible to make calls from callbacks
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ib0c20c9a6d2481ae6d19773044bc234929f9cbb7

8 years agocommon: waitForFile using Inotify 30/50530/1
Jan Olszak [Thu, 29 Oct 2015 11:48:30 +0000 (12:48 +0100)]
common: waitForFile using Inotify

[Feature]       Changed the implementation of waitForFile to use
                the Inotify class
[Cause]         Inotify verification
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I5fe10f38e9ebdf1f0dde02eb6a63bdbb4c1548fd

8 years agoRemove wrapper. Old API is not supported anymore. 96/50296/3
Dariusz Michaluk [Tue, 27 Oct 2015 13:39:54 +0000 (14:39 +0100)]
Remove wrapper. Old API is not supported anymore.

[Feature]       Remove wrapper. Old API is not supported anymore.
                Fix release build.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build.

Change-Id: Ibd3378dee3b7597d7d27c2b8e0a963167d9b296f

8 years agologger: set thread id column width to 2 29/50429/3
Lukasz Pawelczyk [Wed, 28 Oct 2015 12:37:05 +0000 (13:37 +0100)]
logger: set thread id column width to 2

[Feature]       Thread ID is often 2 digit number, reflect that
[Cause]         N/A
[Solution]      N/A
[Verification]  Run some tests and verify visually

Change-Id: Iec1ddbb5bc3e28fc0c2ac199cbdf673348405537

8 years agolxcpp: user namespace setup 87/50187/6
Lukasz Pawelczyk [Mon, 26 Oct 2015 15:03:46 +0000 (16:03 +0100)]
lxcpp: user namespace setup

[Feature]       Setting up of a user namespace. This also changes the
                way namespaces are chosen. This happens automatically now.
[Cause]         N/A
[Solution]      N/A
[Verification]  Run junk tester.

Change-Id: I70c57b56c94ed9650208b63831c77f1ad0c7905c

8 years agoFix build without systemd. 28/50428/1
Dariusz Michaluk [Wed, 28 Oct 2015 12:27:49 +0000 (13:27 +0100)]
Fix build without systemd.

[Feature]       Fix build without systemd.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build.

Change-Id: I06f9623e34dfc44f6090201fad4b024f2cb29e7c

8 years agolxcpp: cgroups API implementation (part 2) 27/49827/9
Krzysztof Dynowski [Mon, 12 Oct 2015 15:38:27 +0000 (17:38 +0200)]
lxcpp: cgroups API implementation (part 2)

[Feature]       Control-groups API for containers
[Cause]         N/A
[Solution]      N/A
[Verification]  build, install, run unit tests

Change-Id: Ica81fcc9b9f31118dfe6167a6b55f814c6ec0453

8 years agoFIX: Don't switch to hostVT during testing. 80/50180/1
Dariusz Michaluk [Mon, 26 Oct 2015 13:36:00 +0000 (14:36 +0100)]
FIX: Don't switch to hostVT during testing.

[Feature]       FIX: Don't switch to hostVT during testing
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests.

Change-Id: Ic02c2387b15a5a162e88806c2dcc5ec2c82e67b0

8 years agoMinor documentation fixes. 03/50103/1
Dariusz Michaluk [Fri, 23 Oct 2015 12:10:41 +0000 (14:10 +0200)]
Minor documentation fixes.

[Feature]       Minor documentation fixes.
[Cause]         N/A
[Solution]      N/A
[Verification]  Generate documentation.

Change-Id: Id14ffc07725296aa2690b6afce24e95ab3bc45d9

8 years agolxcpp: provisioning implementation (part 2) 24/49724/14
Maciej J. Karpiuk [Mon, 19 Oct 2015 12:03:14 +0000 (14:03 +0200)]
lxcpp: provisioning implementation (part 2)

[Feature]       Provisioning implementation for lxcpp: commands.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I3089059c5c4491553a4f45876f372ccb6daab3bb

8 years agoAdd link to demo movie. 03/50003/2
Dariusz Michaluk [Thu, 22 Oct 2015 13:50:14 +0000 (15:50 +0200)]
Add link to demo movie.

[Bug/Feature]   Add link to demo movie
[Cause]         N/A
[Solution]      N/A
[Verification]  N/A

Change-Id: I68e14dc5b80819170c4a000694c31b405d689d2b

8 years agoUse enum class in logger-config as it is possible to serialize now. 36/49936/2
Lukasz Pawelczyk [Wed, 21 Oct 2015 16:32:34 +0000 (18:32 +0200)]
Use enum class in logger-config as it is possible to serialize now.

[Bug/Feature]   N/A
[Cause]         To keep things clean and consistent
[Solution]      N/A
[Verification]  Build, run the junk tester

Change-Id: I75e55448a5f7c559882c6433dc82fae60ab2083b

8 years agolxcpp: cgroups API implementation (part 1) 72/49472/10
Krzysztof Dynowski [Mon, 12 Oct 2015 15:38:27 +0000 (17:38 +0200)]
lxcpp: cgroups API implementation (part 1)

[Feature]       Control-groups API for containers
[Cause]         N/A
[Solution]      N/A
[Verification]  build, install, run unit tests

Change-Id: I13e921b7568b9d2adf70c9499360d77daf80dee2

8 years agocommon: Inotify implementation 30/49730/7
Jan Olszak [Mon, 19 Oct 2015 12:49:45 +0000 (14:49 +0200)]
common: Inotify implementation

[Feature]       Asynchronous file system events
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install and run tests

Change-Id: I53b1d75026550cf3563dce7fb1ea50eede4fb5cb

8 years agoVarious changes relating to create Fedora (LXDE or KDE) Desktop 92/45492/11
Dariusz Michaluk [Wed, 30 Sep 2015 09:01:49 +0000 (11:01 +0200)]
Various changes relating to create Fedora (LXDE or KDE) Desktop

[Bug/Feature]   Various changes relating to create Fedora Desktop
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run server, run tests.

Change-Id: I847ab904012bea962b9961ad70a4e6bed9a69968

8 years agolxcpp: provisioning implementation (part 1) 97/49597/11
Maciej J. Karpiuk [Thu, 15 Oct 2015 09:42:52 +0000 (11:42 +0200)]
lxcpp: provisioning implementation (part 1)

[Feature]       Provisioning implementation for lxcpp (declare, list, remove)
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I3823587de023a9f1a9e34208ae9e188521dbe3b1

8 years agolxcpp: network implementation (part 3) 32/48832/18
Krzysztof Dynowski [Thu, 3 Sep 2015 07:34:37 +0000 (09:34 +0200)]
lxcpp: network implementation (part 3)

[Feature]       Network implementation for lxcpp (routing table manipulation)
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I983a4b565c4b9e1b07ae8ab568445729c0f80eb8

8 years agoDon't force compiler colors by default, add an option for that 33/49533/2
Lukasz Pawelczyk [Wed, 14 Oct 2015 11:43:41 +0000 (13:43 +0200)]
Don't force compiler colors by default, add an option for that

[Feature]       Make it possible to compile without colors.
[Cause]         Compilation can be on a terminal (or non-terminal) that
                does not understand them.
[Solution]      Add a cmake option to force compiler colors, by default
                they are "auto"
[Verification]  cmake -DVASUM_BUILD_FORCE_COMPILER_COLORS=true/false

Change-Id: I60376daa9801e01901af2f9f8d9d3dd5d6c18494

8 years agolxcpp: Removed Namespace enum 75/49475/8
Jan Olszak [Tue, 13 Oct 2015 15:20:41 +0000 (17:20 +0200)]
lxcpp: Removed Namespace enum

[Feature]       Regular Linux CLONE_* flags should be used
                instead of the removed enum
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install and run tests

Change-Id: I29921d1387da76fb50b269f0e92ebb592cf51751

8 years agoImplement Container::console() 08/49308/5
Lukasz Pawelczyk [Thu, 8 Oct 2015 11:28:31 +0000 (13:28 +0200)]
Implement Container::console()

[Feature]       An ability to connect to a PTY given to the container
[Cause]         To be able to use the container
[Solution]      Use PTYs, connect to them and pass read/writes between
                stdin/stdout and pty master.
[Verification]  There is a simple test program in junk for now

Additional changes with patchset:
- extended signal functions
- fixed signalFD class

Change-Id: Ia6320ee32d537311ef2675eb79f3e837192251b8

8 years agolxcpp: Adding init process to UTS, PID, NET, IPC namespaces 31/49331/3
Jan Olszak [Mon, 12 Oct 2015 15:45:21 +0000 (17:45 +0200)]
lxcpp: Adding init process to UTS, PID, NET, IPC namespaces

[Feature]       Starting init in some namespaces.
                MNT and USER need more work.
[Cause]         N/A
[Solution]      Refactored Guard
[Verification]  Build, install and run tests

Change-Id: I3c5ec5c833da34c9ece6acf2c4965e8c57ab966d

8 years agovasum: housekeeping, removal of 'using namespace std;' 90/49290/5
Maciej J. Karpiuk [Mon, 12 Oct 2015 10:29:54 +0000 (12:29 +0200)]
vasum: housekeeping, removal of 'using namespace std;'

[Feature]       N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  N/A

Change-Id: I583b5ad44cd0d460c6b0c4db0d05217ab05cc2e4

8 years agolxcpp: Stopping container's init process 04/49304/3
Jan Olszak [Mon, 12 Oct 2015 10:43:10 +0000 (12:43 +0200)]
lxcpp: Stopping container's init process

[Feature]       Terminating container's init process
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install and run tests

Change-Id: I77af77016d06555b6eea3e133e25a44574580c67

8 years agolxcpp: Added simple container tests 22/49222/4
Jan Olszak [Thu, 8 Oct 2015 15:26:23 +0000 (17:26 +0200)]
lxcpp: Added simple container tests

[Feature]       setInit and setLogger tests
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I944c76aa4483c6c287a6b032b4d7456ab58f7d44

8 years agolxcpp: Switch on serialization from libConfig 13/49213/4
Jan Olszak [Thu, 8 Oct 2015 12:19:22 +0000 (14:19 +0200)]
lxcpp: Switch on serialization from libConfig

[Feature]       Use std::pair and enum serialization
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I6edb4543bf85eacfb2efe13065970326b30aba17

8 years agoconfig: enum class serialization 71/49171/5
Jan Olszak [Wed, 7 Oct 2015 16:13:52 +0000 (18:13 +0200)]
config: enum class serialization

[Feature]       Serialization of strongly typed enums
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests.

Change-Id: Ie4d112995cff8d58c0cc6fad6c0646ec03d5aa83

8 years agolxcpp: cgroups API 08/49208/5
Krzysztof Dynowski [Thu, 8 Oct 2015 12:03:43 +0000 (14:03 +0200)]
lxcpp: cgroups API

[Feature]       Control-groups API for containers
[Cause]         N/A
[Solution]      N/A
[Verification]  N/A

Change-Id: I69605383b40e3b3e1a8c2f6942e85023b367728e

8 years agoFix the color codes effectively fixing the BOLD colors 43/49243/1
Lukasz Pawelczyk [Fri, 9 Oct 2015 14:37:59 +0000 (16:37 +0200)]
Fix the color codes effectively fixing the BOLD colors

[Feature]       N/A
[Cause]         All the colors were always bold
[Solution]      Use proper ANSII color codes
[Verification]  Visual

Change-Id: Id8be7fbbdad46e9952fcecfa2bdd8328eb4e7164

8 years agoIPC unit tests and testing framework improvements 77/48677/14
Pawel Kubik [Fri, 18 Sep 2015 13:03:33 +0000 (15:03 +0200)]
IPC unit tests and testing framework improvements

[Feature]       1. IPC unit tests
                2. Cleaner args parsing in vsm_launch_test.py
                3. Options to launch a test under custom tools
[Cause]         1. N/A
                2. Bugs when launching with external tool
                3. Ability to launch any GDB front-end
[Solution]      1. N/A
                2. Use list instead of string in Popen
                3. Two new command line options
[Verification]  Build, install run tests. Try to run single test with
                a fixture, for example:
                vsm_launch_test.py vasum-server-unit-tests -t \
                  'IPCSuite/Restart<15ThreadedFixture>'
                To test running with --gdb option run test logged as
                root or use sudo with -E option in order to preserve
                environment.

Change-Id: Icb09c0abed5c671c86a8c85d2aab1aa2b2412d29

8 years agoRemove redundant gcc debug option from CMakeList.txt 18/49118/2
Pawel Kubik [Tue, 6 Oct 2015 14:06:40 +0000 (16:06 +0200)]
Remove redundant gcc debug option from CMakeList.txt

[Feature]       N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: I400ad9d6c91560d18d90a3d09d1ee656b4a31948

8 years agoconfig: std::pair serialization 35/49035/7
Jan Olszak [Wed, 30 Sep 2015 10:40:16 +0000 (12:40 +0200)]
config: std::pair serialization

[Feature]       Serialization of pairs
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests.

Change-Id: I5c860e72d91491699deace1c50e213b0538440a4

8 years agoFix buildbreak 13/49113/1
Jan Olszak [Tue, 6 Oct 2015 12:42:28 +0000 (14:42 +0200)]
Fix buildbreak

[Featurei/Bug]  Missing include
[Cause]         N/A
[Solution]      N/A
[Verification]  Clean and build with clang

Change-Id: I76da0251f02449561a60dfb20ccf2504b46789b3

8 years agofix clang build 28/49028/1
Krzysztof Dynowski [Mon, 5 Oct 2015 09:01:14 +0000 (11:01 +0200)]
fix clang build

[Featurei/Bug]  clang fails parsing doxygen comment
[Cause]         N/A
[Solution]      change param reference
[Verification]  Build with clnag

Change-Id: I65d461202d1d6af9bdbfcc89bc104b006e78bf23

8 years agoconfig: std::array serialization. 91/48791/4
Jan Olszak [Tue, 29 Sep 2015 15:41:18 +0000 (17:41 +0200)]
config: std::array serialization.

[Feature]       Serialization of std::array
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests.

Change-Id: I3e2f890d07ef6c0818135566eadb11a025438fd7

8 years agoconfig: Cstring serialization. 58/48758/3
Jan Olszak [Mon, 28 Sep 2015 16:19:07 +0000 (18:19 +0200)]
config: Cstring serialization.

[Feature]       Serialization of null-terminated strings
[Cause]         N/A
[Solution]      Memory for serialized data is allocated with new,
                user should delete[] the field in the destructor
                or when it's not used.
[Verification]  Build, install, run tests.

Change-Id: Iff49e14ab95410bd7a80ee23abf04e9d92e65a55

8 years agolxcpp: network implementation (part 2) 01/48301/17
Krzysztof Dynowski [Thu, 3 Sep 2015 07:34:37 +0000 (09:34 +0200)]
lxcpp: network implementation (part 2)

[Feature]       Network implementation for lxcpp (create/destroy, add/del ip addr)
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I1286efb4893b9b77bebf20f0e40b9fd06611e48b

8 years agoFixed dbus testing container configuration. 34/48734/2
Pawel Kubik [Fri, 25 Sep 2015 12:10:29 +0000 (14:10 +0200)]
Fixed dbus testing container configuration.

[Feature]       Fix
[Cause]         Zone stopped immediately after start.
[Solution]      Added sleep-loop to prevent zone from stopping.
[Verification]  Build (best under CCOV config), install, run:
                sudo vsm_launch_test.py vasum-server-unit-tests \
                -t 'ZoneSuite/DbusConnection'

Change-Id: I1ffc9eb047f08173314c16c60ef505f0d81c11c6

8 years agoImproved coverage report instructions. 35/48735/1
Pawel Kubik [Fri, 25 Sep 2015 12:48:50 +0000 (14:48 +0200)]
Improved coverage report instructions.

[Feature]       More detailed per-file coverage report instructions.
[Cause]         N/A
[Solution]      N/A
[Verification]  Follow new instructions.

Change-Id: I75c563e8627f2f2e5aa22329e231f18fc4f1841a

8 years agohotfix2: assert condition 99/48599/4
Krzysztof Dynowski [Wed, 23 Sep 2015 08:54:20 +0000 (10:54 +0200)]
hotfix2: assert condition

[Feature/Bug]   wrong assert condition
[Cause]         testcase failure
[Solution]      N/A
[Verification]  Build and run tests

Change-Id: I2ad2e674205fbc927cb85251c0cbe037bca039fb

8 years agohotfix: expression always true, use ::ioctl 89/48589/4
Krzysztof Dynowski [Wed, 23 Sep 2015 08:54:20 +0000 (10:54 +0200)]
hotfix: expression always true, use ::ioctl

[Feature/Bug]   mistake in assert check
[Cause]         compilation error, testcase failure
[Solution]      N/A
[Verification]  Build and run tests

Change-Id: Ia9696593c5641a8cc5a2a8b2dc3a9c023609d864

8 years agolxcpp: Attach process helper 69/48369/10
Jan Olszak [Thu, 17 Sep 2015 12:55:25 +0000 (14:55 +0200)]
lxcpp: Attach process helper

[Feature]       N/A
[Cause]         Attach should work in multi-threaded programs
[Solution]      Moved part of Attach implementation to a helper binary
[Verification]  Build, install, run test

Change-Id: Ibdf5e0049ed41fdbbdb67a5f11de8aa415bdb1a5

8 years agolxcpp: Terminal preparation part 2 (guest) 35/48535/2
Lukasz Pawelczyk [Fri, 18 Sep 2015 14:26:58 +0000 (16:26 +0200)]
lxcpp: Terminal preparation part 2 (guest)

[Feature]       Make use of the created pseudoterminals in the container
[Verification]  Build, install, run tests

Changes in this commit:
- PrepGuestTerminal command
- it's main function: setupIOControlTTY()
- some more utils/terminal wrappers for syscalls
- long overdue open(2) wrapper

Change-Id: I235baec044ed82d3376cba3f2e5b4d18f5b1dd71

8 years agolxcpp: Terminal preparation part 1 (host) 70/48370/4
Lukasz Pawelczyk [Thu, 17 Sep 2015 16:18:04 +0000 (18:18 +0200)]
lxcpp: Terminal preparation part 1 (host)

[Feature]       Prepare pseudoterminals for the container
[Verification]  Build, install, run tests

Changes in this commit:
- PrepHostTerminal command and surrounding function (openPty)
- Terminal(s)Config
- Changes to Start::daemonize() to do its job better
- fd-utils helpers for FD flags
- set CLOEXEC on FDs received through libConfig

Change-Id: I432447900c189bb50669267ff4422c36860b5481

8 years agoFixed test scripts 73/48373/3
Pawel Kubik [Fri, 18 Sep 2015 12:41:31 +0000 (14:41 +0200)]
Fixed test scripts

[Feature]       N/A
[Cause]         Unit tests using fixtures can't be run separately,
                because their names contains bash special characters.
[Solution]      Put test names inside quotes.
[Verification]  Install, launch single test case with fixture.

Change-Id: I61e426957e080b1a145bd901c155677775d571ba

8 years agolxcpp: network implementation (part 1) 56/47256/20
Krzysztof Dynowski [Thu, 27 Aug 2015 13:25:58 +0000 (15:25 +0200)]
lxcpp: network implementation (part 1)

[Feature]       Network implementation for lxcpp (list, details)
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I2f43a2bb6d042b5aad9abf87951965e585fb4eb6

8 years agoInstructions for generating code coverage report 77/48177/4
Pawel Kubik [Tue, 15 Sep 2015 13:40:41 +0000 (15:40 +0200)]
Instructions for generating code coverage report

[Feature]       Instructions in markdown
[Cause]         Need for local coverage reports
[Solution]      N/A
[Verification]  Follow instructions in the file and check report

Change-Id: I69df0752268585c622b5006107ab91a59b840ea7

8 years agolxcpp: Initial implementation of the start API call 48/47548/22
Lukasz Pawelczyk [Wed, 29 Jul 2015 11:27:25 +0000 (13:27 +0200)]
lxcpp: Initial implementation of the start API call

[Feature]       Initial implementation of the start API call.
[Verification]  Build, install, run tests

Significant changes related to the start API call:
- Start command that daemonizes and execs guard binary
- Guard process implementation that execs the container's init

Additional changes in this commit supporting the Start API call:
- API extension to Channel class, support close on exec and be able
  to survive (as a FD) exec() call
- set close on exec in persistent file logger
- new logger helper to setup the logger
- add pid to the log format

Change-Id: I2d9648e2a861add2aa1bd1d66587bff2a109cc9c

8 years agolxcpp: Setting up the control terminal 13/48213/3
Jan Olszak [Wed, 16 Sep 2015 09:22:22 +0000 (11:22 +0200)]
lxcpp: Setting up the control terminal

[Feature]       Setting up the control terminal in Attach
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I6b1dced4f9a16c04e82b122679f86b90be29d3d1

8 years agoCLI bash completion fix 98/48098/3
Pawel Kubik [Mon, 14 Sep 2015 10:20:36 +0000 (12:20 +0200)]
CLI bash completion fix

[Feature]       CLI bash completion fix
[Cause]         Bash completion broken after commit 4a9c93f
[Solution]      Bash completion script template fix
[Verification]  Build, install, check CLI completion

Change-Id: Iff043a983d042e4181b33b0f6c4e415befcc22ed

8 years agoStatic common library 93/47893/8
Pawel Kubik [Wed, 9 Sep 2015 15:27:08 +0000 (17:27 +0200)]
Static common library

[Feature]       Static common library
[Cause]         Need for cleaner dependency management
[Solution]      Rules for building static common library, linking it
                with other binaries instead of manually adding sources
[Verification]  Build, install, run tests and main executables

Change-Id: I6eccf5a706b88ca4576e5bfc31b73ebe87177ff5

8 years agocppcheck fixes 59/47759/3
Pawel Kubik [Mon, 7 Sep 2015 09:17:45 +0000 (11:17 +0200)]
cppcheck fixes

[Feature]       Small code fixes based on cppcheck
[Cause]         Minimizing possible runtime errors
[Solution]      Fix the code using cppcheck suggestions, suppress
                false-positives
[Verification]  Compile, run cppcheck

Change-Id: I94fab8e50879f78f3ccb503fd18606e9cbfabfb5

8 years agoAdd colorful output for the CLI 68/47268/15
Pawel Kubik [Tue, 1 Sep 2015 14:14:23 +0000 (16:14 +0200)]
Add colorful output for the CLI

[Feature]       Colorful CLI output
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run CLI

Change-Id: I2123fbd6c5b94ed20eaa278ce00e371e86ff61f0

8 years agolibIpc: doxygen docs added 65/47565/8
Maciej J. Karpiuk [Fri, 4 Sep 2015 10:45:38 +0000 (12:45 +0200)]
libIpc: doxygen docs added

[Feature]       libIpc doxygen docs enabled and enhanced
[Cause]         documentation task in progress, libIpc was not yet included
[Solution]      write missing docs, create group
[Verification]  build docs and check libIpc module

Change-Id: Ic8e5261200da9714b478461fe830fabbaa3b5bc9

8 years agoserver: file logging added to logging backends 67/47567/4
Maciej J. Karpiuk [Fri, 4 Sep 2015 14:39:29 +0000 (16:39 +0200)]
server: file logging added to logging backends

[Feature]       new logging backend support: file
[Cause]         N/A
[Solution]      one more option to logging-backend
[Verification]  try to log to file and user specified filename

Change-Id: Iae51c076c1b52439ff6388cf50b85dc14165a59e

8 years agolxcpp: Changes to the ContainerImpl class API for libConfig usage 47/47547/6
Lukasz Pawelczyk [Wed, 29 Jul 2015 11:27:25 +0000 (13:27 +0200)]
lxcpp: Changes to the ContainerImpl class API for libConfig usage

[Feature]       Changes to the ContainerImpl class API for libConfig usage.
                PersistentFileBackend for logger.
[Verification]  Build, install, run tests.

Change-Id: I3e7290df2bf42df9e067fe6734b96dcf5f3aa20b

8 years agoAdjust tests to lxc-1.1.3 63/47563/2
Dariusz Michaluk [Fri, 4 Sep 2015 11:58:47 +0000 (13:58 +0200)]
Adjust tests to lxc-1.1.3

[Feature]       Adjust tests to lxc-1.1.3
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I26d3abed39b60f5072399edcb116567d125d82f0

8 years agolxcpp: UID/GID setting in Attach 45/47545/1
Jan Olszak [Thu, 3 Sep 2015 18:50:19 +0000 (20:50 +0200)]
lxcpp: UID/GID setting in Attach

[Feature]       UID/GID setting
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Iaa83cab137df53a1391f01c0a29ef236da030aee

8 years agolxcpp: Command implementation 78/47478/4
Jan Olszak [Wed, 2 Sep 2015 15:04:45 +0000 (17:04 +0200)]
lxcpp: Command implementation

[Feature]       Base class for commands
                Attach command
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Id9ed43c145704f5d9d21f1aa210694fed1615c57

8 years agoipc: Fix critical build break in unique-id 64/47464/1
Lukasz Kostyra [Thu, 3 Sep 2015 12:47:47 +0000 (14:47 +0200)]
ipc: Fix critical build break in unique-id

[Bug]           Build break using Clang due to recently added unique-id code
[Cause]         Incorrectly used Doxygen syntax causing critical build error
[Solution]      Correct the syntax.
[Verification]  Build, install, run tests

Change-Id: Ia0194aadfcd5cdcfba90cd518d24fe733edc934b

8 years agoserver: logging-backend selection via command line. 51/47051/12
Maciej J. Karpiuk [Fri, 28 Aug 2015 13:39:41 +0000 (15:39 +0200)]
server: logging-backend selection via command line.

[Feature]       command-line option to select logging backend
[Cause]         logging backend selected in compile-time, no flexibility
[Solution]      add command-line option, select backend in runtime
[Verification]  start service with different logging options.

Change-Id: I410457521462b29d4c40995b37bbd8ea06e479b4

8 years agolxcpp: Setting up environment variables 71/47271/7
Jan Olszak [Thu, 27 Aug 2015 15:06:30 +0000 (17:06 +0200)]
lxcpp: Setting up environment variables

[Feature]       Setting up environement in attach
                Created the commands directory
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I7526f04ca48e931be75a99cdbf774b4c5fbb5c35

8 years agoChange MessageID and PeerID type to UIDs 35/46235/7
Lukasz Kostyra [Thu, 13 Aug 2015 13:29:03 +0000 (15:29 +0200)]
Change MessageID and PeerID type to UIDs

[Feature]       MessageID and PeerID are generated with UIDs - a timestamp
                and UUID pair.
[Cause]         Previously used unsigned ints might overflow and create a
                security issue.
[Solution]      Implement UID class, change MessageID and PeerID to use UID
[Verification]  Build, install, run tests

Change-Id: I493cba8e55cc9985d3b2b544b78c434d4deb4191

8 years agoFixed clang compilation errors 77/47177/2
Pawel Kubik [Mon, 31 Aug 2015 14:29:47 +0000 (16:29 +0200)]
Fixed clang compilation errors

[Feature]       Fixed clang compilation errors
[Cause]         C++ flags were being passed to the C compiler
[Solution]      Pass C++ flags to the C++ compiler only
[Verification]  Build using clang

Change-Id: Ie9c7abfaea0ef47381bc045353d1ea3724a19671

8 years agoMove ccolor to common/utils 78/47178/3
Pawel Kubik [Mon, 31 Aug 2015 10:34:44 +0000 (12:34 +0200)]
Move ccolor to common/utils

[Feature]       Move ccolor.hpp and ccolor.cpp from libs/logger to common/utils
[Cause]         ccolor should be available to the CLI without logger as dependency
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ic16301b30bd90e60300e243ee8b2dac309eadfac

8 years agoFix GetNetdevAttrs test 47/47047/2
Dariusz Michaluk [Thu, 27 Aug 2015 15:32:21 +0000 (17:32 +0200)]
Fix GetNetdevAttrs test

[Feature]       N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I75ba46b0a923622e07d857535496615ac1708ce3

8 years agoRefactored logging code. 20/46920/14
Pawel Kubik [Tue, 25 Aug 2015 08:30:03 +0000 (10:30 +0200)]
Refactored logging code.

[Feature]       Improved logging messages
[Cause]         Inconsistent logging messages on different loggers
[Solution]      Unified logging messages
[Verification]  Build, install, run tests

Change-Id: I7424733e97a4081707f64c3c4256021c560c7cfc

8 years agolxcpp: add all required objects to lxcpp.so, add test executable 44/47044/4
Krzysztof Dynowski [Fri, 28 Aug 2015 10:52:51 +0000 (12:52 +0200)]
lxcpp: add all required objects to lxcpp.so, add test executable

[Feature]       Linking with lxcpp give unknown symbol errors
[Cause]         No requird objects in lxcpp.so
[Solution]      Add them to CMakeLists.txt, create test app
[Verification]  Build, install

Change-Id: I4dc59091ea294aa51a6201236f6fe51162459b83

8 years agoImproved CLI connection error note. 19/46919/7
Pawel Kubik [Fri, 21 Aug 2015 15:19:46 +0000 (17:19 +0200)]
Improved CLI connection error note.

[Feature]       CLI connection error note, and suggestion to launch
                vasum-server
[Cause]         Previous information was inacurate
[Solution]      Added proper error handling
[Verification]  Build, install, run cli/vsm when the server is not
                running

Change-Id: I59a4467a25ef40e6ed650485c8ac690f955e29cc

8 years agolxcpp: AttachManager and chdir 74/46874/7
Jan Olszak [Wed, 26 Aug 2015 16:42:18 +0000 (18:42 +0200)]
lxcpp: AttachManager and chdir

[Feature]       Added AttachManager for handling attaching
                It's possible to set cwd inside container.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ida77e56a7d4f42225554c8fe02b5794509b83ef2

8 years agolxcpp: network interface 66/46566/6
Krzysztof Dynowski [Fri, 21 Aug 2015 15:08:22 +0000 (17:08 +0200)]
lxcpp: network interface

[Feature]       Network interface for lxcpp
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ifcf03b46662168c198a8e36c268b6856639ff52e

8 years agoAdd Doxygen libConfig documentation. 65/46865/4
Pawel Kubik [Wed, 19 Aug 2015 15:28:08 +0000 (17:28 +0200)]
Add Doxygen libConfig documentation.

[Feature]       libConfig documentation
[Cause]         Explain the library usage
[Verification]  Built HTML using generate_documentation.sh and rendered
                it in browser

Change-Id: I459756566055023f357fb2037b3409410129f53e

8 years agolxcpp: Dropping capabilities from the bounding set 68/46668/4
Jan Olszak [Mon, 24 Aug 2015 15:07:57 +0000 (17:07 +0200)]
lxcpp: Dropping capabilities from the bounding set

[Feature]       N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Id9e351d1993b43850e6a4d2a59b9eac2b4c5d354

8 years agoAdd ascii-art logo to the readme 58/46558/3
Lukasz Pawelczyk [Fri, 21 Aug 2015 13:27:15 +0000 (15:27 +0200)]
Add ascii-art logo to the readme

[Feature]       AA logo
[Cause]         We love it
[Verification]  Look and admire

Change-Id: I1bb6181e708a9a8643d77bd860619880e4ca81a2

8 years agolxcpp: Remounting /proc and /sys on attach 41/46641/5
Jan Olszak [Mon, 24 Aug 2015 09:13:05 +0000 (11:13 +0200)]
lxcpp: Remounting /proc and /sys on attach

[Feature]       Remounting /proc /sys
                Filesystem handling functions
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I8015b7a66c1fabab9133ad360e9e7a45c069082c

8 years agolxcpp: Simple attach implementation 40/46340/8
Jan Olszak [Tue, 18 Aug 2015 10:02:12 +0000 (12:02 +0200)]
lxcpp: Simple attach implementation

[Feature]       Running code in the container's context
                Socketpair wrapper - Channel
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ib5b1011c5f8578ab9e258bcbea3cd7aa3bc233a3

8 years agovsm: update network related help, formating changes 63/46463/2
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

8 years agovsm: make vsm> prompt, finish prompt line on exit in interactive mode 42/46342/2
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

8 years agovsm: persistant history of entered commands in interactive mode 22/46322/4
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

8 years agoSupport getting list of ip/mask for one interface, change netdev_set_ip* to netdev_ad... 29/45029/5
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

8 years agoCleanup cppcheck statistics 58/45358/6
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

8 years agolxcpp: fix linking of 3rd party binaries with lxcpp 82/45282/3
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

8 years agoInputMonitor connected to epoll dispatcher 85/44785/7
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

8 years agoAdd daemonize function to work in the background. 71/44871/12
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

8 years agolxcpp: Added utils sources 10/45110/3
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

8 years agoFix lxcpp tests 12/45212/2
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

8 years agolxcpp: setns wrapper 34/45034/6
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

8 years agoAdd test for Lock/UnlockQueue API 20/44920/4
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

8 years agoMake vasum-cli arguments shorter/nicer with autocomplete, rename tool vasum-cli to vsm 12/44612/23
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

8 years agoFix pkg-config files from returning wrong relative paths. 15/44915/2
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

8 years agolxcpp: Added logger, tests and changed exceptions 65/44865/6
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

8 years agoRemove debug logs in release build. 83/44783/2
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

8 years agoHide VsmZone and VsmNetdevType structs from API 48/44748/4
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

8 years agoAdded lxcpp's license 81/44781/4
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

8 years agoVarious changes relating to build on Ubuntu and Fedora Linux. 91/44191/8
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

8 years agolxcpp skeleton 13/44613/8
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

8 years agoFix build break 32/44732/1
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

8 years agoFix build break in clang 72/44672/2
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