Commit graph

401 commits

Author SHA1 Message Date
Guillaume J. Charmes
e56562c35e Merge pull request #3566 from tianon/fix-volume-symlinks
Fix symlink mounting issues
2014-01-21 11:37:05 -08:00
Paul Nasrat
71c1646ba3 Don't expose cgroups via the execdriver API.
Use Resources to represent container limits rather than a cgroup specific field.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
2014-01-20 17:06:24 -05:00
Paul Nasrat
2553029959 Extract cgroups pkg.
Initial move before enhancing cgroups package.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
2014-01-20 14:15:44 -05:00
Paul Nasrat
2e094db639 Extract mount into pkg.
Mount is self contained and generic, it should be in pkg, to allow other pkg modules to use it.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
2014-01-20 13:59:29 -05:00
Tianon Gravi
7379a22a8d Fix symlink mounting issues by evaluating symlinks directly on the LHS of a bind-mount -v and by FollowSymlinkInScope on the RHS just before mounting
Tested successfully with variations around mounting /var/run and /var/run/docker.sock inside a "debian" container directly at /var/run/docker.sock where /var/run is a symlink to "/run" on both the host and in the container.

Fixes #3262

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-01-20 00:38:54 -07:00
Michael Crosby
70a5cb95b3 Move lxc template into lxc driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:58 -08:00
Guillaume J. Charmes
9e9f4b925b Rename Capabilities in sysinfo and move it to its own subpackage
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)

Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: crosbymichael)
2014-01-17 17:42:58 -08:00
Guillaume J. Charmes
889b4b10ae Cleanup + add Info to driver in order to have specific IsRunning()
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)

Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
8c9f62d037 Improve wait for lxc and driver interface
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
c2b602b2ac Use utils.Go to get error from monitor
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
f3f2456b04 Simplify chroot wait, address code review issues
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
8a38ead219 Move setup pty and standard pipes to funcs
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
1e81387edc Remove SysinitPath from process
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
f846ecdc77 Make exec driver run a blocking command
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
8e0741f5e4 Add chroot driver for testing
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
1d8455e683 Move RootIsShared to lxc driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
93ead2fe78 Update with lxc unconfined changes
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
66782730b8 Fix network disabled for container
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
77936ba1a1 Fix race in set running
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
381d593d04 Fix race in cleanup
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
ad9710685c Fix race in TestRun
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
8b60273f76 Update with container specific waitLock
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
8e87835968 Rework monitor and waitlock inside of driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:22 -08:00
Michael Crosby
5a3d9bd432 WIP complete integration test run
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:21 -08:00
Michael Crosby
1c1cf54b0a Fix tty set issue for ioctl error
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:21 -08:00
Michael Crosby
5573c744e4 Embed exec.Cmd on Process
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:21 -08:00
Michael Crosby
25a2697717 Keep state in core on container
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:21 -08:00
Michael Crosby
f2680e5a5b Integrate process changes in container.go
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-17 17:42:21 -08:00
Michael Crosby
f231539e99 Add remount for bind mounts in ro
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-14 15:20:21 -08:00
Michael Crosby
0354c3a95c Do not add hostname when networking is disabled
Docker-DCO-1.0-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-08 16:57:56 -08:00
Tianon Gravi
e525ad3f9b Fix a few miscellaneous typos (Unkown -> Unknown, Recieve -> Receive)
Docker-DCO-1.0-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-01-07 22:15:53 -07:00
Solomon Hykes
7ce7516c12 Move utility package 'term' to pkg/term 2013-12-23 23:42:37 +00:00
Michael Crosby
566ff54d0d Allow mtu to be configured at daemon start 2013-12-20 12:12:03 -05:00
Michael Crosby
0e6f0c4e02 Move MTU setting outside of lxc and set with netlink 2013-12-19 11:51:44 -08:00
Victor Vieux
f21bd80e90 Merge pull request #3271 from crosbymichael/mount-outside
Perform docker specific mounts outside of lxc
2013-12-19 11:13:31 -08:00
Michael Crosby
7bc96aec7b Improve interface by moving to subpkg
Enable builds on OSX
2013-12-18 16:42:49 -08:00
Victor Vieux
536da93380 prevent a panic with docker run -v / 2013-12-18 13:57:49 -08:00
Michael Crosby
45d7dcfea2 Handle external mounts outside of lxc 2013-12-18 13:46:02 -08:00
Victor Vieux
f9328ad9cc Merge pull request #3201 from jpoimboe/libvirt-prereq-network
Set hostname and IP address from dockerinit
2013-12-13 10:38:17 -08:00
Josh Poimboeuf
e877294321 dockerinit: propagate "container" env variable from lxc
Lxc (and libvirt) already set the "container" env variable
appropriately[1], so just use that.

[1] http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/
2013-12-12 20:08:58 -06:00
Josh Poimboeuf
ecc51cd465 dockerinit: set IP address
Set the IP address in dockerinit instead of lxc utils, to prepare for
using libvirt-lxc.
2013-12-12 19:57:11 -06:00
Josh Poimboeuf
b8f1c73705 dockerinit: drop capabilities
Drop capabilities in dockerinit instead of with lxc utils, since
libvirt-lxc doesn't support it.

This will also be needed for machine container mode, since dockerinit
needs CAP_SYS_ADMIN to setup /dev/console correctly.
2013-12-12 13:47:24 -06:00
Guillaume J. Charmes
8fd9633a6b
Improve FollowLink to handle recursive link and be more strick 2013-12-11 17:19:02 -08:00
Michael Crosby
f396c42cad Fix volumes on the host by following symlinks in a scope 2013-12-11 16:31:02 -08:00
Daniel Garcia
761184df52 don't open bind mounted files/dirs to get Stat, use os.Lstat 2013-12-10 12:49:53 -06:00
Paul Nasrat
40fe9f581b Extract volume bind, creation and external methods.
Make Start() slightly more readable.
2013-12-03 18:58:31 -05:00
Paul Nasrat
84f78d9cad Extract helper method for volume linking.
Makes this more readable.
2013-12-03 17:35:54 -05:00
Guillaume J. Charmes
d6cdbca6c1 Merge pull request #2775 from daniel-garcia/2671-bindmount_files
fixes #2671, add support for bind mounting individual files in to contai...
2013-12-02 09:30:08 -08:00
Guillaume J. Charmes
fbebe20bc6
Add a GetPtyMaster() method to container to retrieve the pty from an other package.
We could also have put ptyMaster public, but then we need to ignore it in json
otherwise the Marshalling fails. I think it is cleaner that way.
2013-11-29 07:40:44 -08:00
daniel-garcia
0198f8a879 fixes #2671, add support for bind mounting individual files in to containers, rebases of #1757 #2301 2013-11-21 23:40:35 -06:00