Guillaume J. Charmes
597e0812fb
Merge pull request #4645 from crosbymichael/add-logger
...
Add logger to libcontainer
2014-03-17 11:30:14 -07:00
Brandon Philips
128381e0f0
refactor(libcontainer): rename to CapabilitiesMask
...
The Capabilities field on libcontainer is actually used as a mask.
Rename the field so that this is more clear.
Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
2014-03-17 11:07:12 -07:00
Michael Crosby
0e863a584a
Add stderr log ouput if in debug
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-14 09:55:05 -07:00
Michael Crosby
7294392c72
Add initial logging to libcontainer
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-14 09:55:05 -07:00
Alexander Larsson
6c266c4b42
Move all bind-mounts in the container inside the namespace
...
This moves the bind mounts like /.dockerinit, /etc/hostname, volumes,
etc into the container namespace, by setting them up using lxc.
This is useful to avoid littering the global namespace with a lot of
mounts that are internal to each container and are not generally
needed on the outside. In particular, it seems that having a lot of
mounts is problematic wrt scaling to a lot of containers on systems
where the root filesystem is mounted --rshared.
Note that the "private" option is only supported by the native driver, as
lxc doesn't support setting this. This is not a huge problem, but it does
mean that some mounts are unnecessarily shared inside the container if you're
using the lxc driver.
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-13 20:01:29 +01:00
Alexander Larsson
636959e20a
Move .dockerenv parsing to lxc driver
...
This is not needed for e.g. the native driver
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-13 20:01:29 +01:00
Guillaume J. Charmes
fd0737df2c
Update parseLxcInfo to comply with new lxc1.0 format
...
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-03-11 12:08:32 -07:00
Guillaume J. Charmes
721562f296
Remove goroutine leak upon error
...
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-03-11 11:39:28 -07:00
Victor Vieux
0a6d9035cf
Merge pull request #4589 from creack/update_maintainer
...
Update MAINTAINER email + add self to pkg/signal MAINTAINER
2014-03-11 10:18:37 -07:00
Alexander Larsson
07c35b41a5
Move execdriver construction into execdriver/execdrivers
...
This can't be in execdriver (dependency loop) but should not be
hardcoded inside runtime.go either. So we put it in a subpackage.
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-11 16:37:19 +01:00
Guillaume J. Charmes
915d967f55
Update email + add self to pkg/signal
...
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-03-10 20:26:45 -07:00
Michael Crosby
36dd124b16
Add env var to toggle pivot root or ms_move
...
Use the DOCKER_RAMDISK env var to tell the native driver not to use
a pivot root when setting up the rootfs of a container.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-06 19:30:52 -08:00
unclejack
1695c77c43
Merge pull request #4509 from crosbymichael/kill-all
...
Remove the ghosts and kill everything
2014-03-07 01:35:38 +02:00
Michael Crosby
772ef99d28
Remove the ghosts and kill everything
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-06 15:30:26 -08:00
unclejack
e4ebe6a12f
Merge pull request #4488 from crosbymichael/return-correct-lxc-pid
...
Return correct process pid for lxc
2014-03-07 00:14:08 +02:00
Alexander Larsson
5c9b28db18
libcontainer: Don't use UsetCloseOnExec, it is racy
...
We can't keep file descriptors without close-on-exec except with
syscall.ForkLock held, as otherwise they could leak by accident into
other children from forks in other threads.
Instead we just use Cmd.ExtraFiles which handles all this for us.
This fixes https://github.com/dotcloud/docker/issues/4493
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-06 14:10:32 +01:00
Michael Crosby
69e3d30bb6
Return correct process pid for lxc
...
Fixes #2875
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-05 18:02:19 -08:00
Guillaume J. Charmes
920a6ca54c
Generate and load custom docker profile for apparmor
...
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-03-05 15:02:11 -08:00
Guillaume J. Charmes
cb4189a292
Add AppArmor support to native driver + change pipe/dup logic
...
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-03-05 13:08:24 -08:00
Victor Vieux
c987901f8d
Add missing -- when we run dockerinit from native
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-05 20:26:48 +00:00
Michael Crosby
0cdf102638
Change veth prefix back to veth
...
Fixes #4453
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-04 11:46:05 -08:00
Guillaume J. Charmes
69c69059fc
Merge pull request #4327 from crosbymichael/add-libcontainer
...
Add native execution driver to docker and make it the default
2014-03-03 16:34:20 -08:00
Victor Vieux
f30f823bf5
fix docker info with lxc 1.0.0
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-28 00:32:58 +00:00
Michael Crosby
44c3b71332
Ensure that ticker does not leak
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-27 11:40:25 -08:00
Michael Crosby
fdeea90fc8
Allow child process to live if daemon dies
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-27 09:33:36 -08:00
Michael Crosby
a115ce797b
Ensure that the container dir is remove on restore
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-27 08:28:55 -08:00
Michael Crosby
fb08b8b221
Code review updates
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-26 19:21:46 -08:00
Michael Crosby
70820b69ec
Make network a slice to support multiple types
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-26 14:20:41 -08:00
Michael Crosby
ce08083f9c
Merge branch 'master' into add-libcontainer
...
Conflicts:
execdriver/termconsole.go
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-26 12:55:24 -08:00
unclejack
22da8cdc7e
Merge pull request #4282 from ibuildthecloud/jumbo-frames
...
Add MTU to lxc conf to make host and container MTU match
2014-02-26 20:11:38 +02:00
unclejack
d8b60cb592
Merge pull request #4308 from vbatts/vbatts-seperate_driver_term
...
seperate out the terminal functions from lxc
2014-02-26 16:58:21 +02:00
Michael Crosby
bfdf07ac98
Return error for lxc-conf when using native driver
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-25 17:13:00 -08:00
Michael Crosby
5c67d2e634
Ensure that the container's dir is remove from native driver on stop
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-25 16:27:07 -08:00
Michael Crosby
93ed15075c
Fix cross compile for make cross
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-25 15:19:13 -08:00
Michael Crosby
96e33a7646
Move container.json and pid file into a root specific driver dir
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-25 12:41:31 -08:00
Guillaume J. Charmes
ca42758368
Merge branch 'add-libcontainer' of https://github.com/crosbymichael/docker into add-libcontainer
...
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-02-25 11:42:15 -08:00
Michael Crosby
de083400b8
Address initial feedback from pr
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-25 10:54:41 -08:00
Vincent Batts
c35853191c
correcting the package name for the terminal setup
...
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-02-25 10:07:06 -05:00
Guillaume J. Charmes
91bf120c51
Better capability/namespace management
...
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-02-24 21:52:29 -08:00
Michael Crosby
431d510cae
Remove container env var from libcontainer
...
Update tests to use native driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 21:51:00 -08:00
Michael Crosby
8db740a38e
Move types around in native driver
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 21:21:35 -08:00
Michael Crosby
f8453cd049
Refactor and improve libcontainer and driver
...
Remove logging for now because it is complicating things
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 21:11:52 -08:00
Michael Crosby
d59c05a37c
Fix exec driver flag, rename new driver to 'native'
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 20:41:09 -08:00
Michael Crosby
27a43692c2
Merge branch 'master' into add-libcontainer
...
Conflicts:
runtime.go
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 20:35:12 -08:00
Michael Crosby
ca537a63a8
Remove chroot driver, it's not needed
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 18:52:48 -08:00
Michael Crosby
9cb4573d33
Improve logging for nsinit
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 18:38:36 -08:00
Michael Crosby
77f68f74c7
Rename namespace driver to docker
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 16:42:30 -08:00
Michael Crosby
9f03fd76b5
Fix restore container by nspid
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 16:35:11 -08:00
Michael Crosby
9bf6cb2692
Fix get pids for nsinit
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 16:26:06 -08:00
Michael Crosby
a76407ac61
Cgroups allow devices for privileged containers
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 15:47:23 -08:00