Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Merge API Branch into Master #388

Merged
merged 130 commits into from
Feb 20, 2015
Merged

Merge API Branch into Master #388

merged 130 commits into from
Feb 20, 2015

Conversation

crosbymichael
Copy link
Contributor

No description provided.

crosbymichael and others added 30 commits December 5, 2014 15:20
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]>
This helps aid our effort of returning useful errors.

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: Victor Marmol <[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]>
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]>
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]>
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]>
mrunalp and others added 15 commits February 13, 2015 20:17
Add config generation for simple user namespace testing.
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
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
@vmarmol
Copy link
Contributor

vmarmol commented Feb 20, 2015

GitHub seems angry that it can't auto-merge. Does that mean we need a rebase or are we gonna force push?

@vmarmol
Copy link
Contributor

vmarmol commented Feb 20, 2015

But generally: 👍 :)

@crosbymichael
Copy link
Contributor Author

I made github happy now

@vmarmol
Copy link
Contributor

vmarmol commented Feb 20, 2015

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

@crosbymichael
Copy link
Contributor Author

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.

@vmarmol
Copy link
Contributor

vmarmol commented Feb 20, 2015

Merging...

vmarmol added a commit that referenced this pull request Feb 20, 2015
Merge API Branch into Master
@vmarmol vmarmol merged commit 5b73860 into master Feb 20, 2015
@vmarmol vmarmol deleted the api branch February 20, 2015 00:30
@mrunalp
Copy link
Contributor

mrunalp commented Feb 20, 2015

LGTM awesome stuff 👍

@LK4D4
Copy link
Contributor

LK4D4 commented Feb 20, 2015

Haha, late to party. Comment for container.Start is pretty misleading :)

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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants