Граф коммитов

55 Коммитов

Автор SHA1 Сообщение Дата
Michael Crosby a57900e35f Allow volumes from to be individual files
Fixes #4741
Right now volumes from expected a dir and not a file so when the drivers
 tried to do the bind mount, the destination was a dir, not a file so it
 fails to run.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-31 17:27:38 +00:00
Victor Vieux c705e4a80b Merge pull request #4884 from rhatdan/remount-var-lib-docker
Remount /var/lib/docker as --private to fix scaling issue
2014-03-28 17:15:32 -07:00
Alexander Larsson 66c5e19f9b devmapper: Ensure we shut down thin pool cleanly.
The change in commit a9fa1a13c3
made us only deactivate devices that were mounted. Unfortunately
this made us not deactivate the base device. Which caused
us to not be able to deactivate the pool.

This fixes that by always just deactivating the base device.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-28 15:58:14 +01:00
Dan Walsh 792bb41e52 Remount /var/lib/docker as --private to fix scaling issue
If an admin mounts all file systems as -rshared (Default on RHEL and Fedora)
we see a scaling problem as the number of container increase.

Basically every new container needs to have it new mounts in /var/lib/docker
shared to all other containers, this ends up with us only able to scale to
around 100 containers, before the system slows down.

By simply bind mounting /var/lib/docker on its and then setting it private,
the scaling issue goes away.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-03-28 09:19:21 -04:00
unclejack 69ba31e17e Merge pull request #4450 from alexlarsson/cgroups-systemd
Add systemd implementation of cgroups
2014-03-28 03:05:02 +02:00
Guillaume J. Charmes d848e2d113 Merge pull request #4871 from crosbymichael/bip-exists
Return error when existing bridge does not match ip
2014-03-27 14:51:21 -07:00
Alexander Larsson 6c7835050e cgroups: Add systemd implementation of cgroups
This implements cgroup.Apply() using the systemd apis.
We create a transient unit called "docker-$id.scope" that contains
the container processes. We also have a way to set unit specific
properties, currently only defining the Slice to put the
scope in.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-27 22:44:31 +01:00
Alexander Larsson 7a3070a600 Add --opt arguments for drivers
In order to handle special configuration for different drivers we
make the Config field a map to string array. This lets
us use it for lxc, by using the "lxc" key for those, and we can
later extend it easily for other backend-specific options.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-27 21:47:47 +01:00
Michael Crosby ba9f9b3c92 Merge pull request #4818 from viirya/fix_working_dir_not_dir
fix the problem when setting existing file as working dir
2014-03-27 11:41:18 -07:00
unclejack 303a954151 Merge pull request #4838 from crosbymichael/btrfs-ftw
Promote btrfs
2014-03-27 19:55:25 +02:00
Dan Walsh 4c43566925 This patch adds SELinux labeling support.
docker will run the process(es) within the container with an SELinux label and will label
all of  the content within the container with mount label.  Any temporary file systems
created within the container need to be mounted with the same mount label.

The user can override the process label by specifying

-Z With a string of space separated options.

-Z "user=unconfined_u role=unconfined_r type=unconfined_t level=s0"

Would cause the process label to run with unconfined_u:unconfined_r:unconfined_t:s0"

By default the processes will run execute within the container as svirt_lxc_net_t.
All of the content in the container as svirt_sandbox_file_t.

The process mcs level is based of the PID of the docker process that is creating the container.

If you run the container in --priv mode, the labeling will be disabled.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-03-26 15:30:40 -04:00
Michael Crosby baba9cde95 Return error when existing bridge does not match ip
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-26 11:51:27 +00:00
Victor Vieux abef5cb0fc Merge pull request #4628 from kippandrew/port-allocator
Fix port collision with dynamically allocated ports
2014-03-25 14:30:10 -07:00
Victor Vieux 6643cc20fe Merge pull request #4794 from alexlarsson/dm-better-shutdown
devicemapper: Better/faster shutdown
2014-03-25 14:03:00 -07:00
viirya 293157b8b3 check if working dir is a directory and raise corresponding errors when making dir.
Docker-DCO-1.1-Signed-off-by: Liang-Chi Hsieh <viirya@gmail.com> (github: viirya)
2014-03-25 17:47:08 +08:00
Michael Crosby 68dd722e3c Promote btrfs
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-24 14:15:04 +00:00
Michael Crosby d503714285 Revert "Disable automatic killing of containers when docker stop fails"
This reverts commit 8b5cf51d60.

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-24 12:03:56 +00:00
Victor Vieux 97e5295f43 Merge pull request #4800 from vieux/rename_network_driver
rename lxc to bridge
2014-03-21 16:52:40 -07:00
Ken ICHIKAWA 4002eac8b8 Fix since time exit display when s.FinishedAt is zero
When s.FinishedAt is zero, the since time exit in docker ps doesn't display correct time.
For example
```
Exited (0) 292.471209 years ago
```
This patch fixes the since time exit to display nothing if s.FinishedAt is zero.

Docker-DCO-1.1-Signed-off-by: Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com> (github: ichik1)
2014-03-21 15:28:02 +09:00
Victor Vieux 8944fb2e9b rename lxc to bridge
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-20 21:51:28 +00:00
Alexander Larsson a9fa1a13c3 devicemapper: Better/faster shutdown
Right now shutdown is looping over *all* devicemapper
devices and actively deactivating them, this is pretty
slow if you have a lot of non-active containers. We
instead only deactivate the devices that are mounted.

We also do the shutdown unmount using MNT_DETACH which
forces the unmount in the global namespace, even if it
is busy because of some container having it mounted.
This means the device will be freed when that container
exits.

Also, we move the call to waitClose to deactivateDevice
because all callers of any of them call both anyway.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-20 17:38:35 +01:00
Daniel Norberg fbfac21ed4 configurable dns search domains
Add a --dns-search parameter and a DnsSearch
configuration field for specifying dns search
domains.

Docker-DCO-1.1-Signed-off-by: Daniel Norberg <daniel.norberg@gmail.com> (github: danielnorberg)
2014-03-19 10:49:25 -04:00
Victor Vieux 3b1d590269 cleanup container.stop
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-18 23:48:14 +00:00
Guillaume J. Charmes bfbf338f51 Merge pull request #4684 from cpuguy83/4682-do_not_sigkill_on_docker_stop
Disable automatic killing of containers when docker stop fails
2014-03-18 11:28:42 -07:00
Michael Crosby 1e56ec8b67 Merge pull request #4733 from vieux/3729_time_exit
add time since exit in docker ps
2014-03-18 11:25:11 -07:00
Vincent Batts 5cfea26bcf btrfs: build tags
correct filename and make the tag more readable

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-03-18 13:44:23 -04:00
Vincent Batts 85a62d9b77 btrfs: build tags
Default to the same build behavior, but allow a go build tag to disable
building of the btrfs graphdriver

	go build -tags no_btrfs' ...
	$ go build
	$ objdump -S docker | grep btrfs | wc -l
	194
	$ go build -tags no_btrfs
	$ objdump -S docker | grep btrfs | wc -l
	1
	# that is a comment ;-)

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-03-18 13:44:22 -04:00
Andy Kipp 555416fd02 Add err checks for port allocator tests
Docker-DCO-1.1-Signed-off-by: Andy Kipp <andy@rstudio.com> (github: kippandrew)
2014-03-18 13:30:21 -04:00
Andy Kipp 73c416a20d Be more explicit in finding next port to allocate
Docker-DCO-1.1-Signed-off-by: Andy Kipp <andy@rstudio.com> (github: kippandrew)
2014-03-18 13:30:21 -04:00
Andy Kipp 7a1db291fc Better test error message
Docker-DCO-1.1-Signed-off-by: Andy Kipp <andy@rstudio.com> (github: kippandrew)
2014-03-18 13:30:21 -04:00
Andy Kipp f7b6fbbd76 Prevent dynamic allocation of previously allocated ports
Docker-DCO-1.1-Signed-off-by: Andy Kipp <andy@rstudio.com> (github: kippandrew)
2014-03-18 13:30:21 -04:00
Victor Vieux f14c0866ec Merge pull request #4674 from vbatts/vbatts-graphdriver_build_tags
graphdriver: build tags
2014-03-18 10:25:59 -07:00
Alexander Larsson a70beda1ec devmapper: Increase timeout in waitClose to 10sec
As reported in https://github.com/dotcloud/docker/issues/4389 we're
currently seeing timeouts in waitClose on some systems. We already
bumped the timeout in waitRemove() in
https://github.com/dotcloud/docker/issues/4504.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-18 15:54:40 +01:00
Vincent Batts 448b64164d runtime: no build tags for vfs driver
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-03-17 21:54:43 -04:00
Vincent Batts 670ce98c60 graphdriver: build tags
Enable build tags for all the graphdrivers to be excludable.

As an example:
```
$ go build
$ ls -l docker
-rwxr-xr-x 1 vbatts vbatts 18400158 Mar 14 14:22 docker*
$ go build -tags "exclude_graphdriver_aufs exclude_graphdriver_vfs exclude_graphdriver_devicemapper"
$ ls -l docker
-rwxr-xr-x 1 vbatts vbatts 17467068 Mar 14 14:22 docker*
```

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-03-17 21:54:05 -04:00
Victor Vieux 15a267b57d add time since exit in docker ps
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-18 01:34:43 +00:00
Timothy Hobbs 659b719aa6 Refactor out interface specific information from execdriver.Network
Docker-DCO-1.1-Signed-off-by: Timothy Hobbs <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)
2014-03-17 22:53:48 +01:00
Timothy Hobbs 353df19ab7 Fix issue #4681 - No loopback interface within container when networking is disabled.
Docker-DCO-1.1-Signed-off-by: Timothy Hobbs <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)

Remove loopback code from veth strategy

Docker-DCO-1.1-Signed-off-by: Timothy Hobbs <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)

Looback strategy: Get rid of uneeded code in Create
Docker-DCO-1.1-Signed-off-by: Timothy Hobbs <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)

Use append when building network strategy list

Docker-DCO-1.1-Signed-off-by: Timothy Hobbs <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)

Swap loopback and veth strategies in Networks list

Docker-DCO-1.1-Signed-off-by: Timothy Hobbs <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)

Revert "Swap loopback and veth strategies in Networks list"

This reverts commit 3b8b2c8454171d79bed5e9a80165172617e92fc7.

Docker-DCO-1.1-Signed-off-by: Timothy Hobbs <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)

When initializing networks, only return from the loop if there is an error

Docker-DCO-1.1-Signed-off-by: Timothy Hobbs <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)
2014-03-17 22:01:24 +01:00
Guillaume J. Charmes dd040c9870 Merge pull request #4723 from vieux/fix_panic_monitor
fix panic in monitor
2014-03-17 13:52:22 -07:00
unclejack 0e92c7c24a Merge pull request #4721 from vieux/4716-display_ps-fix
Fix display command display in docker ps
2014-03-17 22:04:00 +02:00
Victor Vieux 1dfc440733 fix panic in monitor
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-17 19:33:40 +00:00
Brian Goff 8b5cf51d60 Disable automatic killing of containers when docker stop fails
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
2014-03-17 15:15:44 -04:00
Michael Crosby 2bddcd68b4 Gofmt imports
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-17 11:41:28 -07:00
Michael Crosby 96c4816cef Move graphdrivers into runtime top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-17 11:40:12 -07:00
Michael Crosby af385151ce Move execdrivers into runtime top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-17 11:40:12 -07:00
Michael Crosby 2230c9b9a7 Move networking drivers into runtime top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-17 11:40:12 -07:00
Victor Vieux 5921b186d1 display command display in docker ps
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-17 18:36:15 +00:00
unclejack 28a9ff7f25 Merge pull request #4653 from creack/fix_expose_cache
Fix expose cache
2014-03-14 16:09:13 +02:00
Michael Crosby 3fa99b35b0 Don't kill by pid for other drivers
Closes #4575
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-13 15:04:23 -07:00
Guillaume J. Charmes ab26c16b32
Fix EXPOSE cache miss issue
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-03-13 13:58:09 -07:00