Commit Graph

1179 Commits

Author SHA1 Message Date
Alexander Morozov cbc8dee085 Ensure that state always contains pathes to all namespaces
Thanks coolljit0725 for initial fix.

Closes #512

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-07 14:50:08 -07:00
Alexander Morozov 6012d1056d Merge pull request #502 from hqhq/hq_fix_systemd_freeze
bugfix and cleanup for systemd cgroup
2015-04-06 09:22:41 -07:00
Mrunal Patel 9a25d3000c Merge pull request #505 from hqhq/hq_add_systemd_test
add systemd integration test
2015-04-03 12:58:43 -07:00
Michael Crosby 346236be68 Merge pull request #507 from crosbymichael/nsinit-root
Change nsinit root to /var/run/nsinit
2015-04-03 10:50:32 -07:00
Michael Crosby bce9e0f63c Merge pull request #490 from dqminh/make-binary
add binary target to direct install in a container
2015-04-03 10:50:10 -07:00
Michael Crosby fa9efe82f9 Change nsinit root to /var/run/nsinit
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-04-03 10:45:01 -07:00
Qiang Huang c502c7322a add systemd integration test
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-04-03 13:17:22 +08:00
Alexander Morozov d00b836985 Merge pull request #504 from crosbymichael/pid1-fixes
Fix pdeathsig and ppid for supervisor running as pid1
2015-04-02 14:09:47 -07:00
Michael Crosby 46132cebcf Fix pdeathsig and ppid for supervisor running as pid1
For some reason when the supervisor of a container is PID1 the parent
death signal was being delivered to the container's init process even if
it did not die.  Also the ppid() will return 1 for a container running
in the pid namespace of it's parent and the parent is pid1.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-04-02 13:55:55 -07:00
Mrunal Patel c22ac4876f Merge pull request #498 from athoune/typo
Fix: typos.
2015-04-02 13:50:04 -07:00
Mathieu Lecarme ee1000e153 Fix: typos.
Docker-DCO-1.1-Signed-off-by: Mathieu Lecarme <mathieu@garambrogne.net> (github: athoune)
2015-04-02 22:41:41 +02:00
Qiang Huang f9a0d21fab cleanup for systemd cgroup
Add join function so we can reduce duplicate code, and we can
call Set api in fs cgroup, that can reduce sync work on fs side
and systemd side.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-04-02 11:00:35 +08:00
Qiang Huang 4c2886d59a don't change state if systemd freeze failed
It has been fixed in fs base cgroup, but missed in systemd based.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-04-02 10:22:38 +08:00
Michael Crosby b89112c542 Merge pull request #493 from hqhq/hq_fix_nsinit_doc
fix README.md for nsinit
2015-04-01 10:47:44 -07:00
Alexander Morozov 397b675315 Merge pull request #497 from Mashimiao/use-unified-subsystems
cgroups/systemd: Use unified subsystems
2015-03-31 23:06:54 -07:00
Qiang Huang c06f92353f fix README.md for nsinit
Cut the long lines and add `--config` to the `nsinit exec` command.
And some grammar fix.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-04-01 13:50:48 +08:00
Ma Shimiao 8961fd20e6 cgroups/systemd: Use unified subsystems
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-04-01 12:04:54 +08:00
Mrunal Patel 1a246dd543 Merge pull request #494 from Mashimiao/return-clear-freezer-error
cgroups: reurn error when passing invalid argument to freezer
2015-03-31 12:59:01 -07:00
Ma Shimiao 0eb8a1aac3 cgroups: reurn error when passing invalid argument to freezer
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-04-01 00:04:33 +08:00
Mrunal Patel c851275416 Merge pull request #489 from philips/stop-test-unit
cgroups: systemd: attempt to stop test scope, if any
2015-03-30 17:55:21 -05:00
Michael Crosby 1f176f3c0d Merge pull request #491 from LK4D4/fix_parent_find
Fix finding parent for fs cgroups
2015-03-30 15:29:37 -07:00
Alexander Morozov dc82e30089 Fix finding parent for fs cgroups
It was just supposed, that parent always like /root/subsystem, but it
can be /root/subsystem1,subsystem2

Fixes docker/docker#10690

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-30 14:12:15 -07:00
Michael Crosby 562cd20d05 Merge pull request #488 from ZJU-SEL/add_nsinit_readme
add readme for nsinit about how to build nsinit
2015-03-30 10:40:44 -07:00
wonderflow 3b95acdfa1 Add readme for nsinit about how to build nsinit
Signed-off-by: Sun Jianbo <wonderflow@zju.edu.cn>
2015-03-30 13:37:26 +08:00
Daniel, Dao Quang Minh c4a8de8de0 add binary target to direct install in a container
This add `make binary` to perform direct install libcontainer binaries inside
dockercore/libcontainer container instead of having to install dependencies and
run `make direct-install` on the host.

The `nsinit` binary will be placed into `bundles/nsinit`, and we ignore the
bundles directory from git.

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
2015-03-28 08:14:22 +00:00
Michael Crosby af371eae76 Merge pull request #487 from LK4D4/not_mask_esrch
Use syscall.Kill instead of p.cmd.Process.Kill
2015-03-27 10:53:29 -07:00
Alexander Morozov ee102305fb Use syscall.Kill instead of p.cmd.Process.Kill
We need this to unmask syscall.ESRCH error, which handled in docker and
can be handled by other clients.

Closes #457

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-27 10:50:32 -07:00
Michael Crosby dc4c502efd Merge pull request #484 from mrunalp/process_caps
Process capabilities
2015-03-26 10:10:47 -07:00
Brandon Philips 9e787db1b1 cgroups: systemd: attempt to stop test scope, if any
As reported in #477 the test scope may not be cleaned up between runs.
In order to fix this we must be polite and remove the scope after we
have done our test and attempt to remove an existing scope if it exists.
This way we can guarantee our test will run.

Signed-off-by: Brandon Philips <brandon.philips@coreos.com>
2015-03-25 18:15:35 -04:00
Mrunal Patel 3cd416efe1 Add a test for Process Capabilities.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2015-03-25 15:41:09 -04:00
Mrunal Patel ca73d7aede Pass down process Capabilities and apply them if present.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2015-03-25 15:40:32 -04:00
Mrunal Patel d284fdfaa3 Add Capabilities field to process.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2015-03-25 15:39:34 -04:00
Alexander Morozov a6044b701c Merge pull request #481 from coolljt0725/fix_typo_in_init_linux
Fix minor typo in init_linux.go
2015-03-25 08:51:20 -07:00
Lei Jitang a4f2e1e187 Fix minor typo in init_linux.go
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-03-25 14:58:22 +08:00
Michael Crosby 8530167f7f Merge pull request #480 from mrunalp/device_mount
mount: Add a flag to bind devices when user namespaces are enabled.
2015-03-24 17:43:55 -07:00
Mrunal Patel 2c037b7fd9 mount: Add a flag to bind devices when user namespaces are enabled.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2015-03-24 20:34:14 -04:00
Alexander Morozov 37d229d026 Merge pull request #475 from hqhq/hq_remove_redundant_code
remove redundant code
2015-03-24 11:36:42 -07:00
Michael Crosby bfa67ab988 Merge pull request #478 from LK4D4/update_caps
Update syndtr/gocapability to 8e4cdcb3c22b40d5e330ade0b68cb2e2a3cf6f98
2015-03-24 10:23:12 -07:00
Alexander Morozov 451043367b Update syndtr/gocapability to 8e4cdcb3c22b40d5e330ade0b68cb2e2a3cf6f98
It includes fix for RHEL6 which has no cap_last.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-24 08:53:28 -07:00
Qiang Huang 7766c1e07b remove redundant code
Now we return not found err in path(), so no need to check again.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-03-24 09:19:40 +08:00
Michael Crosby fd0087d3ac Merge pull request #474 from crosbymichael/revert-cgroups-change
Revert "cgroups: only return path when subsystem really mounted
2015-03-23 14:09:04 -07:00
Michael Crosby c5eef90460 Add back check for mountpoint to return consistent error
Adding this check here allows a nice error displaying that the specified
cgroup subsystem is not mounted.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-23 13:32:00 -07:00
Michael Crosby fc3981ea5c Revert "cgroups: only return path when subsystem really mounted"
This reverts commit 606d9064b0.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-23 13:31:42 -07:00
Victor Marmol f8daab8a96 Merge pull request #472 from crosbymichael/fix-cgroup-error-handling
path now returns the IsNotFound error
2015-03-23 11:40:39 -07:00
Michael Crosby c099a20eb8 path now returns the IsNotFound error
This error is not propogated up to the caller and needs to be handled at
the site where d.path() is called.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-23 11:32:09 -07:00
Alexander Morozov 5c6332687d Merge pull request #469 from Snorch/systemd-check-property-defaultdependencies
systemd: properly check DefaultDependencies is read only
2015-03-23 10:43:31 -07:00
Pavel Tikhomirov dc4bd4cece systemd: properly check DefaultDependencies is read only
on systemd v208 in Centos7 and Fedora20 error is not:
"org.freedesktop.DBus.Error.PropertyReadOnly"
but:
"property.org.freedesktop.DBus.Error.PropertyReadOnly"
so check failes and in Docker we get:
Docker daemon: System error: Cannot set property DefaultDependencies, or
unknown property

Fix for commit:
99233fde8c

Signed-off-by: Pavel Tikhomirov <ptikhomirov@parallels.com>
2015-03-23 09:44:15 +03:00
Victor Marmol b6cf7a6c85 Merge pull request #460 from sunyuan3/l1
correct comment errors for netlink_linux.go
2015-03-20 08:16:38 -07:00
Yuan Sun 4fdec5a8e1 correct comment errors for netlink_linux.go
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
2015-03-20 07:55:11 +08:00
Mrunal Patel 4a72e540fe Merge pull request #459 from LK4D4/tmpfs_root
Add TmpfsRoot option
2015-03-19 11:31:11 -07:00