Michael Crosby
5fc19e8db5
Rename Fs fields to fs
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-02-11 11:20:08 -08:00
Mrunal Patel
e48806d39d
Merge pull request #360 from avagin/api-userns-test
...
integration: check a container with userns
2015-02-10 17:14:47 -08:00
Andrey Vagin
c6f5420bed
integration: check a container with userns
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-02-04 14:21:05 +03:00
Mrunal Patel
5d25c7262e
Merge pull request #357 from crosbymichael/api
...
Flatten config structures and remove namespace package
2015-02-03 10:55:06 -08:00
Michael Crosby
ab76a88d6b
Remove Wait() on container interface
...
Since we return the pid for the started process we do not need this
method on the interface.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-02-03 10:50:18 -08:00
Andrey Vagin
bcd0222be5
api: fix config tests
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-02-03 10:00:21 -08:00
Andrey Vagin
daca745c4c
api: fix integration tests
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-02-03 09:59:58 -08:00
Michael Crosby
bbeae7445a
Remove namespaces package
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-02-02 15:41:32 -08:00
Michael Crosby
8191d4d60f
Refactory container interface
...
This removes a new unused methods from the container interface and types
parameters such as os.Signal and WaitStatus
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-31 20:51:12 -08:00
Michael Crosby
935d81f23d
Flatten configuration structs
...
Change the various config structs into one package and have a flatter
structure for easier use.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-31 19:56:27 -08:00
Michael Crosby
77f255a544
Add missing initializers
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-31 14:05:53 -08:00
Mrunal Patel
60f6310b2d
Merge pull request #355 from avagin/api-next
...
namespaces: send config, network state and other arguments in one packet
2015-01-30 13:59:40 -08:00
Andrey Vagin
c3f3db724a
namespaces: don't unroll process arguments
...
It looks better.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-30 10:39:51 +03:00
Andrey Vagin
df52d63854
namespaces: send config, network state and other arguments in one packet
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-30 10:38:35 +03:00
Mrunal Patel
e31ef02610
Merge pull request #351 from avagin/api-rebase-2
...
Merge remote-tracking branch 'origin/master' into api-rebase
2015-01-29 19:20:09 -08:00
Andrey Vagin
ca633b2f29
Merge remote-tracking branch 'origin/master' into api
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-28 14:37:40 +03:00
Michael Crosby
904bae3247
Merge pull request #348 from avagin/api-nsexec
...
nsenter: remove a proxy process
2015-01-26 13:08:02 -08:00
Andrey Vagin
8d8242aa8a
nsenter: add tests
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-26 23:12:50 +03:00
Andrey Vagin
82367938b7
nsenter: remove a proxy process
...
Currently nsexec() creates a proxy process to enter into a pid namespace.
It isn't good, because we need to proxy an exit code and signals.
We can use CLONE_PARENT to fork a process with the right parent.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-26 23:12:50 +03:00
Andrey Vagin
11b2dab1c5
nsenter: add a macros to print errors
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-26 19:44:44 +03:00
Andrey Vagin
e77b238a83
namespaces: don't send a container config twice
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-26 19:44:44 +03:00
Mrunal Patel
fae3abdadd
Merge pull request #342 from avagin/api-next
...
new-api: implement Wait, WaitProcess
2015-01-21 16:59:05 -08:00
Andrew Vagin
61fef16f4a
new-api: implement Wait, WaitProcess
...
Signed-off-by: Andrew Vagin <avagin@openvz.org>
2015-01-21 18:46:01 +03:00
Andrey Vagin
e79e87e426
cgroup/systemd: set config.Cgroups.Freezer
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-21 18:46:00 +03:00
Andrey Vagin
6fc1dd5f25
integration: check a container state after resumning the CT
...
Otherwise CT will be left in a frozen state in a fail case
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-21 18:46:00 +03:00
Andrey Vagin
5162e5a81c
integration: check container.Processes()
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-21 18:46:00 +03:00
Andrey Vagin
10f0ac2921
new-api: remove nsenter.c
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-21 18:46:00 +03:00
Andrey Vagin
f0c20b5601
new-api: remove DefaultCreateCommand()
...
Signed-off-by: Andrew Vagin <avagin@openvz.org>
2015-01-21 18:45:57 +03:00
Mrunal Patel
c70b6812b5
Merge pull request #339 from avagin/api-freezer
...
new-api: implement Pause() and Resume()
2015-01-19 15:17:45 -08:00
Andrey Vagin
5138417f80
integration: add test to check Pause and Resume operations
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-19 22:25:52 +03:00
Andrey Vagin
02c1de6f11
cgroups: set a freezer state before calling FreezerGroup.Set()
...
My previous patch moved the setting of the freezer state after the Set()
command. It's wrong, because this command uses it, so we need to set the
freezer state before the command and rollback it in an error case.
Fixes: 13a5703
("cgroups: don't change a freezer state if an operation failed")
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-19 17:38:26 +03:00
Andrey Vagin
dcb3bca32c
namespaces: destroy cgroups only on error paths
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-19 17:38:26 +03:00
Andrey Vagin
9c50d819ae
new-api: implement Pause() and Resume()
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-19 17:38:26 +03:00
Mrunal Patel
9586935441
Merge pull request #334 from avagin/api-test
...
new-api: integration: check that a process can be executed in an existing CT
2015-01-15 16:55:15 -08:00
Andrew Vagin
7b33e53e4a
integration: check that a process can be executed in an existing CT
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-15 23:48:28 +03:00
Mrunal Patel
cc411c37bd
Merge pull request #333 from avagin/api-console
...
new-api: add Console to ProcessConfig
2015-01-15 12:11:12 -08:00
Andrey Vagin
46e62c9204
nsinit: return console
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-15 18:22:47 +03:00
Andrey Vagin
76d395eff2
new-api: add Console to ProcessConfig
...
Add ability to execute a process with a specified terminal.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-15 18:22:47 +03:00
Victor Marmol
0f9f14c1ac
Merge pull request #332 from mrunalp/vendor/glog
...
Vendors glog dependency for the api branch.
2015-01-14 17:08:33 -08:00
Mrunal Patel
085a8fbff7
Vendors glog dependency for the api branch.
...
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
2015-01-14 20:01:05 -05:00
Victor Marmol
c1a4b31593
Merge pull request #330 from avagin/api-cgroups
...
new-api: implement fs and systemd cgroup managers
2015-01-14 14:50:14 -08:00
Andrey Vagin
6334be0ac5
cgroups: add TODO before NewCgroupManager()
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-15 01:45:49 +03:00
Andrey Vagin
4eaff5e14e
cgroups: don't change a freezer state if an operation failed
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-15 01:45:49 +03:00
Andrey Vagin
083d91f8c3
cgroups: Add comments for methods of cgroup managers
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-15 01:45:49 +03:00
Andrey Vagin
ee6e585e21
cgroups: replace SetPaths on LoadCgroupManager
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-15 00:44:14 +03:00
Andrey Vagin
ba4257a146
new-api: add the Freezer method to cgroup.Manager
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-15 00:43:14 +03:00
Andrey Vagin
59e66b818d
nsinit: add getContainer()
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-15 00:43:13 +03:00
Andrey Vagin
6dd7552537
new-api: implement fs and systemd cgroup managers
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-15 00:43:13 +03:00
Victor Marmol
a7ab930d8d
Merge pull request #311 from avagin/api-linux
...
new-api: execute a process inside an existing container
2015-01-13 14:59:29 -08:00
Andrey Vagin
195a08efbc
new-api: set Cloneflags in namespace.Exec()
...
This place looks more suitable.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2014-12-25 18:44:10 +03:00