Qiang Huang
46573774a2
cgroups: simplify the join_memory check
...
If c.Memory=0, there is no point to set memoryswap.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-01-22 12:19:40 +08:00
Qiang Huang
c4821b6f3e
cgroups: always create device cgroup on systemd
...
This is the same behavior as fs does.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-01-22 09:53:30 +08:00
Daniel, Dao Quang Minh
eb84dd1b73
add dqminh as maintainer
...
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
2015-01-21 20:37:37 -05: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
Michael Crosby
3fbf185602
Merge pull request #337 from hqhq/hq_add_blkio_weight
...
add support for blkio.weight
2015-01-20 10:40:12 -08:00
Michael Crosby
5847aacb32
Merge pull request #340 from mrunalp/check_ns_flags
...
Checks namespace flags for user ns code path.
2015-01-20 10:39:23 -08:00
Mrunal Patel
bde8bf2ebc
Adds namespace flag checks to userns setup.
...
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
2015-01-20 13:26:59 -05:00
Mrunal Patel
107bad0ee5
Adds namespace flag checks for userns code path in init.
...
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
2015-01-20 13:26:20 -05:00
Mrunal Patel
9303a8f15f
Merge pull request #324 from avagin/namespaces
...
namespace: don't change namespaces which are not belonged to the CT
2015-01-20 09:31:24 -08:00
Andrey Vagin
ef73d7e235
namespace: don't change namespaces which are not belonged to the CT
...
An error is reported if a config file contains configuration for
shared namespaces.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-20 15:05:00 +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
Alexander Morozov
b89cd0cf5c
Merge pull request #304 from mrunalp/feature/user_namespaces
...
Adds user namespace support to libcontainer
2015-01-19 11:55:20 -08:00
Mrunal Patel
b0eece8d7d
Adds support for User Namespaces.
...
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
Adds sample configuration to test user namespaces.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
Rebases to master.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
Fixes integration tests.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
Move selinux labeling, apparmor profile and restrict kernel files back to init.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
Separate the code paths for userns and default cases.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
tty not required for setup
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
Cleanup and address review comments.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
Remove debug logs and other cleanup.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
Use function paramaters for SetupContainer.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
2015-01-19 14:50:21 -05: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
Mrunal Patel
eb74393a3d
Merge pull request #338 from avagin/fixes
...
cgroups: set a freezer state before calling FreezerGroup.Set()
2015-01-19 09:33:08 -08:00
Andrey Vagin
e451df796a
namespace: don't create needless namespaces
...
A non-zero Path field for a namespace says that a process should attach to an
existing namespace, so the process can be forked without the flag for this
namespace.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-19 18:43:16 +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
Andrey Vagin
30b3306416
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: 13a5703d85
("cgroups: don't change a freezer state if an operation failed")
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-19 17:26:34 +03:00
Qiang Huang
54968f68bc
add support for blkio.weight
...
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-01-19 14:33:48 +08:00
Michael Crosby
73ba097bf5
Merge pull request #336 from dqminh/execin-wait
...
nsenter waits for parent signal before forking
2015-01-16 14:51:02 -08:00
Daniel, Dao Quang Minh
5a87153824
fix TestNsenterAlivePid
...
unblock the nsenter-exec test process to let it finish succesfully
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
2015-01-16 05:13:19 -05:00
Daniel, Dao Quang Minh
f5dfd9a702
nit: reindent with indent -linux
...
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
2015-01-16 04:58:30 -05:00
Daniel, Dao Quang Minh
9946e299af
nsenter waits for parent signal before forking
...
this allows the parent to place the process into cgroup first so it can track
the children properly
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2015-01-16 04:56:45 -05: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
Victor Marmol
29ba9b3179
Merge pull request #335 from avagin/fixes
...
cgroups: don't change a freezer state if an operation failed
2015-01-15 08:25:10 -08:00
Andrey Vagin
13a5703d85
cgroups: don't change a freezer state if an operation failed
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-15 19:03:18 +03: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
Mrunal Patel
1d3b2589d7
Merge pull request #328 from icecrime/signal_exit_code
...
Fix exit codes when dying on a signal
2015-01-12 17:29:26 -08:00