Commit Graph

55 Commits

Author SHA1 Message Date
cbbfe30c09 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)
Upstream-commit: a57900e35f2c30026a070fdfdbdb0ce99b35e1ff
Component: engine
2014-03-31 17:27:38 +00:00
9b7d158e2c Merge pull request #4884 from rhatdan/remount-var-lib-docker
Remount /var/lib/docker as --private to fix scaling issue
Upstream-commit: c705e4a80bd93fac7af38f5384ca61cb884bd22f
Component: engine
2014-03-28 17:15:32 -07:00
8d7581c203 devmapper: Ensure we shut down thin pool cleanly.
The change in commit a9fa1a13c3b0a654a96be01ff7ec19e8009b2094
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)
Upstream-commit: 66c5e19f9bd057644fab475499ea45bb428ba2b2
Component: engine
2014-03-28 15:58:14 +01:00
6d04587343 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)
Upstream-commit: 792bb41e524615486ef8266b7bf4804b4fe178f1
Component: engine
2014-03-28 09:19:21 -04:00
da6de365f6 Merge pull request #4450 from alexlarsson/cgroups-systemd
Add systemd implementation of cgroups
Upstream-commit: 69ba31e17ea4dab6b040478720955dece5986f6c
Component: engine
2014-03-28 03:05:02 +02:00
528335a67b Merge pull request #4871 from crosbymichael/bip-exists
Return error when existing bridge does not match ip
Upstream-commit: d848e2d113a6978a42cd5bb93fe57f9ea653b627
Component: engine
2014-03-27 14:51:21 -07:00
5f846085d9 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)
Upstream-commit: 6c7835050e53b733181ddfca6152c358fd625400
Component: engine
2014-03-27 22:44:31 +01:00
9e1caa6b4a 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)
Upstream-commit: 7a3070a6000963d12be9dcd2698d911b848a33b6
Component: engine
2014-03-27 21:47:47 +01:00
f731a44bb1 Merge pull request #4818 from viirya/fix_working_dir_not_dir
fix the problem when setting existing file as working dir
Upstream-commit: ba9f9b3c9268a1b201bcb10045da77b135d869d1
Component: engine
2014-03-27 11:41:18 -07:00
e14a0de6e1 Merge pull request #4838 from crosbymichael/btrfs-ftw
Promote btrfs
Upstream-commit: 303a954151f89dc7d2c485417fd0a9bacabe9ad0
Component: engine
2014-03-27 19:55:25 +02:00
f757666ccd 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)
Upstream-commit: 4c4356692580afb3971094e322aea64abe0e2500
Component: engine
2014-03-26 15:30:40 -04:00
7c744319b0 Return error when existing bridge does not match ip
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: baba9cde9542b480162d11bd30ca3a522fa6b4d0
Component: engine
2014-03-26 11:51:27 +00:00
da42bdb7df Merge pull request #4628 from kippandrew/port-allocator
Fix port collision with dynamically allocated ports
Upstream-commit: abef5cb0fcd107c751b7390bc7eb45e3ecd675e6
Component: engine
2014-03-25 14:30:10 -07:00
e9aaf94539 Merge pull request #4794 from alexlarsson/dm-better-shutdown
devicemapper: Better/faster shutdown
Upstream-commit: 6643cc20fe16f36ffb3342bec61a3c0f24d2a9df
Component: engine
2014-03-25 14:03:00 -07:00
2ce68073b6 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)
Upstream-commit: 293157b8b38dd5ea5fa49d90501cc3c86717da40
Component: engine
2014-03-25 17:47:08 +08:00
f6d78803bd Promote btrfs
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 68dd722e3c54995e609b2524bad501ab1d4d15d6
Component: engine
2014-03-24 14:15:04 +00:00
aa948163e7 Revert "Disable automatic killing of containers when docker stop fails"
This reverts commit 8b5cf51d600dc4f3611cf063c52cf3448e7b01e5.

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: d503714285143013d9fa6932ee5775fd155d26d2
Component: engine
2014-03-24 12:03:56 +00:00
08c755a87a Merge pull request #4800 from vieux/rename_network_driver
rename lxc to bridge
Upstream-commit: 97e5295f437bbb9eae26c99842b269aae1b427c2
Component: engine
2014-03-21 16:52:40 -07:00
8e8f727f50 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)
Upstream-commit: 4002eac8b8b4007de03e78dbd57232fac583d05b
Component: engine
2014-03-21 15:28:02 +09:00
2352431354 rename lxc to bridge
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 8944fb2e9b07d5a764f8d48065b9afd73364f640
Component: engine
2014-03-20 21:51:28 +00:00
ca4686cb04 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)
Upstream-commit: a9fa1a13c3b0a654a96be01ff7ec19e8009b2094
Component: engine
2014-03-20 17:38:35 +01:00
c037f13ab8 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)
Upstream-commit: fbfac21ed4de550ce72d993810dc07a2c4877a88
Component: engine
2014-03-19 10:49:25 -04:00
9d78f7e8ee cleanup container.stop
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 3b1d590269466217ddf203edcef295f6cec9fcee
Component: engine
2014-03-18 23:48:14 +00:00
9f3a8a726d Merge pull request #4684 from cpuguy83/4682-do_not_sigkill_on_docker_stop
Disable automatic killing of containers when docker stop fails
Upstream-commit: bfbf338f51f90a67e2866358a33e22d576755439
Component: engine
2014-03-18 11:28:42 -07:00
4879ef6f17 Merge pull request #4733 from vieux/3729_time_exit
add time since exit in docker ps
Upstream-commit: 1e56ec8b67e77a1e99f12b7e7c04245477202c9c
Component: engine
2014-03-18 11:25:11 -07:00
856d46eee0 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)
Upstream-commit: 5cfea26bcfc218ca72eac7115fa257833f28b9f2
Component: engine
2014-03-18 13:44:23 -04:00
cdf7c6a1a7 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)
Upstream-commit: 85a62d9b779bfb351e159f38c2fc95900a0532cd
Component: engine
2014-03-18 13:44:22 -04:00
7976f94412 Add err checks for port allocator tests
Docker-DCO-1.1-Signed-off-by: Andy Kipp <andy@rstudio.com> (github: kippandrew)
Upstream-commit: 555416fd02b9e062385dcdaf0c4b9f5de61df388
Component: engine
2014-03-18 13:30:21 -04:00
0ed607c3a6 Be more explicit in finding next port to allocate
Docker-DCO-1.1-Signed-off-by: Andy Kipp <andy@rstudio.com> (github: kippandrew)
Upstream-commit: 73c416a20db8fe48302a6cf0db4c1c0585ed0739
Component: engine
2014-03-18 13:30:21 -04:00
9ecda2cf3a Better test error message
Docker-DCO-1.1-Signed-off-by: Andy Kipp <andy@rstudio.com> (github: kippandrew)
Upstream-commit: 7a1db291fcedd50ce99649e95109187c76da255c
Component: engine
2014-03-18 13:30:21 -04:00
dc2e6deab9 Prevent dynamic allocation of previously allocated ports
Docker-DCO-1.1-Signed-off-by: Andy Kipp <andy@rstudio.com> (github: kippandrew)
Upstream-commit: f7b6fbbd7664634481c8519e58844d572423f3e1
Component: engine
2014-03-18 13:30:21 -04:00
afc3313920 Merge pull request #4674 from vbatts/vbatts-graphdriver_build_tags
graphdriver: build tags
Upstream-commit: f14c0866ecb5ee38be8d6859ced730d431610743
Component: engine
2014-03-18 10:25:59 -07:00
186bfcdec8 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)
Upstream-commit: a70beda1ecfb049a3f80ad5b159ba51d653fd067
Component: engine
2014-03-18 15:54:40 +01:00
b02e8511f3 runtime: no build tags for vfs driver
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 448b64164df7795cdbd9be0d663269e6e4e4beeb
Component: engine
2014-03-17 21:54:43 -04:00
0ba8b13022 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)
Upstream-commit: 670ce98c60dbac1d46a59bd69bd20b569f4794f1
Component: engine
2014-03-17 21:54:05 -04:00
bf660d94fc add time since exit in docker ps
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 15a267b57d2394dd5cb697f9a80b6df4fc939a76
Component: engine
2014-03-18 01:34:43 +00:00
ff82619b66 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)
Upstream-commit: 659b719aa66e7ed0c3104d3704fa61035050ad82
Component: engine
2014-03-17 22:53:48 +01:00
ccebbeffe2 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)
Upstream-commit: 353df19ab7009f6555dee506841ae0b690a08768
Component: engine
2014-03-17 22:01:24 +01:00
c6aab2eaa4 Merge pull request #4723 from vieux/fix_panic_monitor
fix panic in monitor
Upstream-commit: dd040c98706cd8ee3022061a63dc064b31fff890
Component: engine
2014-03-17 13:52:22 -07:00
ec6d6bab54 Merge pull request #4721 from vieux/4716-display_ps-fix
Fix display command display in docker ps
Upstream-commit: 0e92c7c24a64a4cc36b38ffb35f3e8498bcb1790
Component: engine
2014-03-17 22:04:00 +02:00
06d35a04d8 fix panic in monitor
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 1dfc44073399aadb226c1b4c1909fb15c033d44a
Component: engine
2014-03-17 19:33:40 +00:00
511a3e0407 Disable automatic killing of containers when docker stop fails
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: 8b5cf51d600dc4f3611cf063c52cf3448e7b01e5
Component: engine
2014-03-17 15:15:44 -04:00
8d099b8012 Gofmt imports
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 2bddcd68b4b927d36ffadd80e098f6d4ae2cf5d6
Component: engine
2014-03-17 11:41:28 -07:00
742b723fc2 Move graphdrivers into runtime top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 96c4816cef592a98a235010924bb2417c8451079
Component: engine
2014-03-17 11:40:12 -07:00
68860e9695 Move execdrivers into runtime top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: af385151ceedde097eda8a5195b431e8076cf76b
Component: engine
2014-03-17 11:40:12 -07:00
4b7a6e2613 Move networking drivers into runtime top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 2230c9b9a735d731cc2fee4137633eb98b9da9d5
Component: engine
2014-03-17 11:40:12 -07:00
cad533fcfe display command display in docker ps
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 5921b186d17b172f205f3b0b6bda1f3a4e650d3f
Component: engine
2014-03-17 18:36:15 +00:00
19c6fcaf73 Merge pull request #4653 from creack/fix_expose_cache
Fix expose cache
Upstream-commit: 28a9ff7f2557d88174b46482a5b402c511684cf7
Component: engine
2014-03-14 16:09:13 +02:00
0fda3b88ac Don't kill by pid for other drivers
Closes #4575
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 3fa99b35b05d9159d6f7f4c7465dec747da2c4e1
Component: engine
2014-03-13 15:04:23 -07:00
c733b13d1a Fix EXPOSE cache miss issue
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
Upstream-commit: ab26c16b32420011b0aee3de1a3bce5a0afd6f4d
Component: engine
2014-03-13 13:58:09 -07:00