Daniel, Dao Quang Minh
7d423cb7a1
setns: replace env with netlink for bootstrap data
...
replace passing of pid and console path via environment variable with passing
them with netlink message via an established pipe.
this change requires us to set _LIBCONTAINER_INITTYPE and
_LIBCONTAINER_INITPIPE as the env environment of the bootstrap process as we
only send the bootstrap data for setns process right now. When init and setns
bootstrap process are unified (i.e., init use nsexec instead of Go to clone new
process), we can remove _LIBCONTAINER_INITTYPE.
Note:
- we read nlmsghdr first before reading the content so we can get the total
length of the payload and allocate buffer properly instead of allocating
one large buffer.
- check read bytes vs the wanted number. It's an error if we failed to read
the desired number of bytes from the pipe into the buffer.
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com >
2015-12-03 18:03:48 +00:00
Daniel, Dao Quang Minh
d914bf7347
setns: add bootstrap data
...
add bootstrap data to setns process. If we have any bootstrap data then copy it
to the bootstrap process (i.e. nsexec) using the sync pipe. This will allow us
to eventually replace environment variable usage with more structured data
to setup namespaces, write pid/gid map, setgroup etc.
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com >
2015-11-22 11:36:58 +00:00
Alexander Morozov
97bc9a7faf
Merge pull request #410 from tianon/bump-version
...
Bump version constant to 0.0.5 in preparation for a new release
v0.0.5
2015-11-20 13:45:55 -08:00
Tianon Gravi
e001f947d7
Bump version constant to 0.0.5 in preparation for a new release
...
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com >
2015-11-20 13:42:42 -08:00
Mrunal Patel
56d4e8eb3e
Merge pull request #408 from runcom/update-go-systemd
...
godeps: update go-systemd to v4 and godbus/dbus to v3
2015-11-19 14:50:20 -08:00
Antonio Murdaca
bea558b61f
godeps: update go-systemd to v4 and godbus/dbus to v3
...
Signed-off-by: Antonio Murdaca <runcom@redhat.com >
2015-11-19 23:37:28 +01:00
Alexander Morozov
eccc69e64a
Merge pull request #407 from runcom/unsupported
...
libcontainer: configs: extend unsupported os
2015-11-19 13:53:34 -08:00
Antonio Murdaca
400e05fe5b
libcontainer: configs: extend unsupported os
...
Signed-off-by: Antonio Murdaca <runcom@redhat.com >
2015-11-19 18:24:34 +01:00
Alexander Morozov
776791463d
Merge pull request #357 from ashahab-altiscale/350-container-in-container
...
Bind mount device nodes on EPERM
2015-11-16 14:54:02 -08:00
Mrunal Patel
b28ec60b0e
Merge pull request #373 from mikebrow/bundle-dir-310
...
adding support for --bundle
2015-11-16 12:07:01 -08:00
Mrunal Patel
7d9a6699f7
Merge pull request #401 from jfrazelle/i-have-this-thing-for-static-binaries
...
static binary \o/
2015-11-16 11:39:30 -08:00
Alexander Morozov
476e467fc0
Merge pull request #403 from hqhq/hq_fix_comments
...
Fix comment to be consistent with the code
2015-11-16 10:49:18 -08:00
Qiang Huang
96f0eefa1a
Fix comment to be consistent with the code
...
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com >
2015-11-16 19:16:27 +08:00
Abin Shahab
28c9d0252c
Userns container in containers
...
Enables launching userns containers by catching EPERM errors for writing
to devices cgroups, and for mknod invocations.
Signed-off-by: Abin Shahab <ashahab@altiscale.com >
2015-11-15 14:42:35 -08:00
Jessica Frazelle
ecd6463101
static binary \o/
...
Signed-off-by: Jessica Frazelle <acidburn@docker.com >
2015-11-14 16:33:52 -08:00
Alexander Morozov
48fdc50d09
Merge pull request #398 from crosbymichael/seccomp-trace
...
Add seccomp trace support
2015-11-13 10:54:18 -08:00
Alexander Morozov
bda4ca2f8f
Merge pull request #388 from hqhq/hq_cgroup_cleanups
...
Some cgroup cleanups
2015-11-13 09:06:18 -08:00
Mike Brown
8b19581694
adding support for --bundle -b to start, restore, and spec; fixes issue #310
...
Signed-off-by: Mike Brown <brownwm@us.ibm.com >
2015-11-13 09:13:57 -06:00
Michael Crosby
caca840972
Add seccomp trace support
...
Closes #347
Signed-off-by: Michael Crosby <crosbymichael@gmail.com >
2015-11-12 17:03:53 -08:00
Alexander Morozov
1df35060e4
Merge pull request #391 from mrunalp/exec_validate
...
Validate process configuration for runc exec
2015-11-12 16:35:44 -08:00
Michael Crosby
2be14dc963
Merge pull request #392 from mrunalp/poststart
...
Add poststart hooks
2015-11-12 16:34:38 -08:00
Mrunal Patel
4ee10a9c59
Merge pull request #394 from avagin/email
...
Change my email address
2015-11-10 09:11:55 -08:00
Andrey Vagin
ca0511f58c
Change my email address
...
Signed-off-by: Andrey Vagin <avagin@openvz.org >
2015-11-10 19:39:50 +03:00
Alexander Morozov
c4e528889a
Merge pull request #393 from crosbymichael/fix-opts-race
...
Fix race setting process opts
2015-11-09 10:26:13 -08:00
Michael Crosby
879dfdd980
Fix race setting process opts
...
When starting and quering for pids a container can start and exit before
this is set. So set the opts after the process is started and while
libcontainer still has the container's process blocking on the pipe.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com >
2015-11-06 16:51:59 -08:00
Mrunal Patel
452e8a73c5
Integrate poststart hooks with spec
...
* Call poststart hooks after the container is started
* Tie in with spec configuration
Signed-off-by: Mrunal Patel <mrunalp@gmail.com >
2015-11-06 18:03:32 -05:00
Mrunal Patel
bb2d3cd1be
Add Poststart hook to libcontainer config
...
Signed-off-by: Mrunal Patel <mrunalp@gmail.com >
2015-11-06 18:02:50 -05:00
Mrunal Patel
9f739e0429
Validate process configuration for runc exec
...
We make sure that the args are present. All other items are optional and default to sensible values.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com >
2015-11-06 14:08:50 -05:00
Qiang Huang
209c8d9979
Add some comments about cgroup
...
We fixed some bugs and introduced some code hard to be
understood, add some comments for them.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com >
2015-11-05 19:12:53 +08:00
Qiang Huang
8c98ae27ac
Refactor cgroupData
...
The former cgroup entry is confusing, separate it to parent
and name.
Rename entry `c` to `config`.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com >
2015-11-05 19:12:53 +08:00
Qiang Huang
a263afaf6c
Rename parent and data
...
'parent' function is confusing with parent cgroup, it's actually
parent path, so rename it to parentPath.
The name 'data' is too common to be identified, rename it to cgroupData
which is exactly what it is.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com >
2015-11-05 19:12:53 +08:00
Mrunal Patel
83d7331acc
Merge pull request #360 from jhowardmsft/jjh/container_interface
...
Windows: Refactor Container interface
2015-11-02 15:16:41 -08:00
John Howard
a919bd3f67
Windows: Refactor Container interface
...
Signed-off-by: John Howard <jhoward@microsoft.com >
2015-11-02 15:12:16 -08:00
Mrunal Patel
c42a2952c4
Merge pull request #361 from jhowardmsft/jjh/criu_opts
...
Windows: Factor down criu_opts
2015-11-02 15:05:27 -08:00
Mrunal Patel
7caef5626b
Merge pull request #359 from jhowardmsft/jjh/state_struct
...
Windows: Refactor state struct
2015-11-02 15:04:12 -08:00
Mrunal Patel
cf73b32eeb
Merge pull request #343 from hqhq/hq_unify_behavior_for_memory
...
Unify behavior for memory cgroup
2015-11-02 14:58:31 -08:00
Michael Crosby
cca151c947
Merge pull request #375 from hqhq/hq_fix_systemd_readme
...
README.md: fix description for runc with systemd
2015-11-02 14:56:40 -08:00
Michael Crosby
26eb6a1bcd
Merge pull request #377 from rhatdan/label
...
Docker needs to know whether the user requested a relabel
2015-11-02 14:55:27 -08:00
Mrunal Patel
f0cd955927
Merge pull request #379 from duglin/cleanErrorCases
...
Add more context around some error cases
2015-10-31 09:59:24 -07:00
Doug Davis
e5dc12a0c9
Add more context around some error cases
...
Signed-off-by: Doug Davis <dug@us.ibm.com >
2015-10-30 10:55:48 -07:00
Dan Walsh
69c3ea4e17
Docker needs to know whether the user requested a relabel
...
Signed-off-by: Dan Walsh <dwalsh@redhat.com >
2015-10-28 15:44:38 -04:00
Qiang Huang
826c92faed
README.md: fix description for runc with systemd
...
Fix the command and elaborate the instruction.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com >
2015-10-28 04:21:39 -04:00
John Howard
fe1cce69b3
Windows: Refactor state struct
...
Signed-off-by: John Howard <jhoward@microsoft.com >
2015-10-26 14:45:20 -07:00
Alexander Morozov
db21ac7750
Merge pull request #355 from keloyang/nake
...
Remove naked return
2015-10-25 19:50:41 -07:00
Mrunal Patel
6c36d666a1
Merge pull request #365 from jhowardmsft/jjh/devices
...
Windows: Tidy libcontainer\devices
2015-10-24 19:36:26 -07:00
Mrunal Patel
0d155ba0fb
Merge pull request #362 from jhowardmsft/jjh/configs-cgroup
...
Windows: Refactor configs/cgroup.go
2015-10-24 19:34:54 -07:00
Mrunal Patel
6d85c27599
Merge pull request #364 from jhowardmsft/jjh/fs-build-tags
...
Fixes build tags on cgroups\fs\*.go
2015-10-24 19:33:52 -07:00
John Howard
37675129ba
Windows: Tidy libcontainer\devices
...
Signed-off-by: John Howard <jhoward@microsoft.com >
2015-10-23 13:50:24 -07:00
Alexander Morozov
34fe03fa8a
Merge pull request #238 from adrianreber/master
...
Add criu related debug output
2015-10-23 13:44:03 -07:00
John Howard
fb5a8febce
Fixes build tags on cgroups\fs\*.go
...
Signed-off-by: John Howard <jhoward@microsoft.com >
2015-10-23 13:41:10 -07:00