This repository was archived by the owner on Dec 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 316
Merge API Branch into Master #388
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This modifies Load in the factory to return a ContainerInfo interface that is the read only view of the container when it is loaded. Signed-off-by: Michael Crosby <[email protected]>
Signed-off-by: Michael Crosby <[email protected]>
Signed-off-by: Michael Crosby <[email protected]>
This helps aid our effort of returning useful errors. Signed-off-by: Michael Crosby <[email protected]>
Signed-off-by: Michael Crosby <[email protected]>
Signed-off-by: Michael Crosby <[email protected]>
Signed-off-by: Michael Crosby <[email protected]>
Signed-off-by: Michael Crosby <[email protected]>
Docker-DCO-1.1-Signed-off-by: Mrunal Patel <[email protected]> (github: mrunalp)
Signed-off-by: Mrunal Patel <[email protected]>
Signed-off-by: Mrunal Patel <[email protected]>
Signed-off-by: Victor Marmol <[email protected]>
Signed-off-by: Victor Marmol <[email protected]>
Signed-off-by: Andrew Vagin <[email protected]>
Signed-off-by: Andrew Vagin <[email protected]>
Signed-off-by: Andrew Vagin <[email protected]>
After forking a new processes in a new container, we need to call exec() and tune namespaces. Signed-off-by: Andrew Vagin <[email protected]>
Here is a first step to implement a new API. Currently the init processes is executed without namespaces and cgroups. Signed-off-by: Andrew Vagin <[email protected]>
Signed-off-by: Andrey Vagin <[email protected]>
Prepare ground for moving on new API
We are going to import the namespaces package into libcontainer, so libcontainer should not be imported into namespaces. Signed-off-by: Andrey Vagin <[email protected]>
We are going to import the namespaces package into libcontainer, so libcontainer should not be imported into namespaces. Signed-off-by: Andrey Vagin <[email protected]>
Signed-off-by: Andrey Vagin <[email protected]>
Use namespace.Exec() and namespace.Init() to execute processes in CT. Now an init process is actually executed in a new container. This series doesn't change code about creating containers, it only reworks code according with new API. Signed-off-by: Andrey Vagin <[email protected]>
Signed-off-by: Andrey Vagin <[email protected]>
Could someone explain why we should close this fds? Usually users cares about closing them or not. For example exec.Cmd declares them as io.Reader. Signed-off-by: Andrey Vagin <[email protected]>
Signed-off-by: Andrey Vagin <[email protected]>
Signed-off-by: Andrey Vagin <[email protected]>
Use namespace.Exec() and namespace.Init() to execute processes in CT
If we really need these command, we need to expand API. Signed-off-by: Andrey Vagin <[email protected]>
Signed-off-by: Mrunal Patel <[email protected]>
Add config generation for simple user namespace testing.
Signed-off-by: Michael Crosby <[email protected]>
This allows you to set certian configuration options such as what cgroup implementation to use on the factory at create time. Signed-off-by: Michael Crosby <[email protected]>
Add functional API for Factory configuration
Signed-off-by: Michael Crosby <[email protected]> Conflicts: MAINTAINERS cgroups/cgroups.go cgroups/fs/apply_raw.go cgroups/fs/notify_linux.go cgroups/fs/notify_linux_test.go cgroups/systemd/apply_systemd.go config.go configs/config_test.go console/console.go integration/exec_test.go integration/init_test.go integration/template_test.go integration/utils_test.go linux_notify.go linux_notify_test.go mount/init.go mount/mount_config.go mount/pivotroot.go mount/ptmx.go namespaces/create.go namespaces/exec.go namespaces/execin.go namespaces/init.go namespaces/nsenter/nsenter.c namespaces/nsenter/nsenter.go namespaces/utils.go network/network.go network/types.go network/veth.go notify_linux.go notify_linux_test.go nsinit/exec.go nsinit/main.go nsinit/nsenter.go nsinit/oom.go sample_configs/host-pid.json sample_configs/userns.json security/capabilities/capabilities.go update-vendor.sh
Update api branch with master changes
This updates the console handling to chown the console on creation to the root user within the container. This also moves the setup mounts from the userns sidecar process into the main init processes by trying to mknod devices, if it fails on an EPERM then bind mount the device from the host into the container for use. This prevents access issues when the sidecar process mknods the device for the usernamespace returning an EPERM when writting to dev/null. This also adds some error handling for init processes and nsinit updates with added flags for testing and other functions. Signed-off-by: Michael Crosby <[email protected]>
Move the network setup back into the standard init even for user namespaces now that mounts are fully supported and working. Signed-off-by: Michael Crosby <[email protected]>
Make usernamespaces work without sidecar process
Signed-off-by: Mrunal Patel <[email protected]>
Signed-off-by: Mrunal Patel <[email protected]>
Fixes bug where rootfs was empty instead of pwd when not specified.
Validation for user namespace in the config.
Signed-off-by: Michael Crosby <[email protected]> Conflicts: cgroups/systemd/apply_systemd.go
GitHub seems angry that it can't auto-merge. Does that mean we need a rebase or are we gonna force push? |
But generally: 👍 :) |
Merge master into api
I made github happy now |
LGTM, unless anyone has any reservations I think we're ready to merge :) Huuuge shout out to @avagin who did most of the work on getting us here! @mrunalp and @crosbymichael getting us back in shape so this has feature-parity with HEAD |
Yes, thanks to everyone. I would say that this will be iterated on in master then when we feel comfortable we can tag it at v2 just incase we need to many any additional api or config changes. |
Merging... |
LGTM awesome stuff 👍 |
Haha, late to party. Comment for |
wking
added a commit
to wking/runc
that referenced
this pull request
Feb 19, 2018
gocapability has supported 0 as "the current PID" since syndtr/gocapability@5e7cce49 (Allow to use the zero value for pid to operate with the current task, 2015-01-15, syndtr/gocapability#2). libcontainer was ported to that approach in 444cc29 (namespaces: allow to use pid namespace without mount namespace, 2015-01-27, docker-archive/libcontainer#358), but the change was clobbered by 22df555 (Merge branch 'master' into api, 2015-02-19, docker-archive/libcontainer#388) which landed via 5b73860 (Merge pull request opencontainers#388 from docker/api, 2015-02-19, docker-archive/libcontainer#388) . This commit restores the changes from 444cc29. Signed-off-by: W. Trevor King <[email protected]>
wking
added a commit
to wking/runc
that referenced
this pull request
Feb 19, 2018
gocapability has supported 0 as "the current PID" since syndtr/gocapability@5e7cce49 (Allow to use the zero value for pid to operate with the current task, 2015-01-15, syndtr/gocapability#2). libcontainer was ported to that approach in 444cc29 (namespaces: allow to use pid namespace without mount namespace, 2015-01-27, docker-archive/libcontainer#358), but the change was clobbered by 22df555 (Merge branch 'master' into api, 2015-02-19, docker-archive/libcontainer#388) which landed via 5b73860 (Merge pull request opencontainers#388 from docker/api, 2015-02-19, docker-archive/libcontainer#388). This commit restores the changes from 444cc29. Signed-off-by: W. Trevor King <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.