Commit Graph

3083 Commits

Author SHA1 Message Date
f153cf13ed Update RestartPolicy of container
Add `--restart` flag for `update` command, so we can change restart
policy for a container no matter it's running or stopped.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: ff3ea4c90f2ede5cccc6b49c4d2aad7201c91a4c
Component: engine
2016-02-20 17:06:32 +08:00
7b8239e00e Merge pull request #20471 from calavera/userland_proxy_config_fix
Avoid setting default truthy values from flags that are not set.
Upstream-commit: 6668326aa8cbb8af32bb49b4a843be2cae762cb3
Component: engine
2016-02-19 21:00:37 -05:00
2d2a092a9b Merge pull request #20446 from estesp/fix-userns-cp
Fix copy chown settings to not default to real root
Upstream-commit: 3d65e7126c60ef23a7f0e255cd2e4b5938859413
Component: engine
2016-02-19 19:45:44 -05:00
2625f17a24 Avoid setting default truthy values from flags that are not set.
When the value for a configuration option in the file is `false`,
and the default value for a flag is `true`, we should not
take the value from the later as final value for the option,
because the user explicitly set `false`.

This change overrides the default value in the flagSet with
the value in the configuration file so we get the correct
result when we merge the two configurations together.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 31cb96dcfaaebe3f807e7c7bf82a48b5995c743b
Component: engine
2016-02-19 18:39:10 -05:00
d9c028ed66 Merge pull request #20419 from aboch/cr
Allow passing global datastore to libnetwork and v0.7.0-dev1 vendoring
Upstream-commit: 117a982d2e805d3279ff75fcec071635e5191ef6
Component: engine
2016-02-18 17:39:46 -08:00
b3b5161196 Fix copy chown settings to not default to real root
This corrects `docker cp` behavior when user namespaces are enabled.
Instead of chown'ing copied-in files to real root (0,0), the code
queries for the remapped root uid & gid and sets the chown option
properly.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 40be5dba473aa57a388fe26bb79ac38a66653f31
Component: engine
2016-02-18 14:44:13 -08:00
fa1db664e1 Invoke ReloadConfiguration on network controller
- It reverts fa163f5619bb01cabca1c21 plus a small change
  in order to allow passing the global scope datastore
  to libnetwork after damon boot.

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: ed364b69df0432d0143e7661c4c0695377ceef7b
Component: engine
2016-02-18 12:14:14 -08:00
7d665cca4e Merge pull request #17513 from aidanhs/aphs-expose-ipv6-default-bridge
Expose bridge IPv6 setting to `docker network inspect`
Upstream-commit: 2e6c841b826cc73332c44d5a04a5996fc65af724
Component: engine
2016-02-18 10:35:04 -08:00
684142a88d Merge pull request #20333 from rhatdan/mqueue
/dev/mqueue should never be mounted readonly
Upstream-commit: be5939f40778d8056edff621153391e322f149d5
Component: engine
2016-02-18 11:02:17 -05:00
0376c9075e Merge pull request #20407 from tiborvass/backmerge-1.10.1
Backmerge 1.10.1 fixes to master
Upstream-commit: b26c21f7040c89b055d4fe135e45b3ab0b881ddb
Component: engine
2016-02-17 13:45:43 -08:00
ea1de57ceb Don’t stop daemon on migration hard failure
Also changes missing storage layer for container
RWLayer to a soft failure.

Fixes #20147

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 2798d7a6a681aee8995e87c9b68128e54876d2b5)
Upstream-commit: 55080fc03bed4dba85d5c5760363b92851ff728f
Component: engine
2016-02-17 14:26:30 -05:00
83d138a180 Merge pull request #20366 from LK4D4/socks_proxy
Add support for forwarding Docker client through SOCKS proxy
Upstream-commit: 5c78515430860ad822e016cc5cd5d5ff3dd6a21c
Component: engine
2016-02-16 22:29:49 -08:00
5aea778205 Merge pull request #19689 from cednation/etwlogs
Windows: Add ETW logging driver plug-in
Upstream-commit: c795d0bab9057fbf16ca70349bcc37e244be33b9
Component: engine
2016-02-16 15:01:17 -08:00
90b76dddc5 Merge pull request #20367 from tonistiigi/fix-import-gzip
Fix docker import on compressed data
Upstream-commit: 0f5624d37433cd93eb6a19f8d8e513ad399d6d47
Component: engine
2016-02-16 14:09:46 -08:00
f663556077 Merge pull request #19498 from mountkin/refactor-jsonfilelog-reader
use pubsub instead of filenotify to follow json logs
Upstream-commit: 8545fdc6ddd7010a4134062cf99444e586c3c99e
Component: engine
2016-02-16 13:55:48 -08:00
442a84b35d Windows: Add ETW logging driver plug-in
Signed-off-by: Cedric Davies <cedricda@microsoft.com>
Upstream-commit: 3fe60bbf95b60f1a1e847a48e1c9b9730e570dff
Component: engine
2016-02-16 13:24:49 -08:00
8b2acafeee Fix docker import on compressed data
Fixes #20296

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e1c2eb0d35460c2de9cbf4a70439afa63b9d2be1
Component: engine
2016-02-16 11:19:23 -08:00
4f226110ac Add support for forwarding Docker client through SOCKS proxy
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 05002c2501ac549b3cf677ab04d0f571cc456360
Component: engine
2016-02-16 11:09:28 -08:00
8271be384a Fix the typo
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: c33cdf9ee3ece0358f828c7ac8f6367c3414e67a
Component: engine
2016-02-16 07:00:01 +00:00
dad375d1d2 /dev/mqueue should never be mounted readonly
If user specifies --read-only flag it should not effect /dev/mqueue.
This is causing SELinux issues in docker-1.10.  --read-only blows up
on SELinux enabled machines.  Mounting /dev/mqueue read/only would also
blow up any tool that was going to use /dev/mqueue.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: adb2e3fedc76fbaecce0d75a29aa0d419be5c4c2
Component: engine
2016-02-15 14:56:07 -05:00
6ebcbbfdd8 use pubsub instead of filenotify to follow json logs
inotify event is trigged immediately there's data written to disk.
But at the time that the inotify event is received, the json line might
not fully saved to disk. If the json decoder tries to decode in such
case, an io.UnexpectedEOF will be trigged.
We used to retry for several times to mitigate the io.UnexpectedEOF error.
But there are still flaky tests caused by the partial log entries.

The daemon knows exactly when there are new log entries emitted. We can
use the pubsub package to notify all the log readers instead of inotify.

Signed-off-by: Shijiang Wei <mountkin@gmail.com>

try to fix broken test. will squash once tests pass

Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: b1594c59f5e0d1ac898eacde8d91b1ba33c2b626
Component: engine
2016-02-15 19:25:16 +08:00
05e211a98f Merge pull request #20290 from calavera/fix_stop_signal_merge
Inherit StopSignal from Dockerfile.
Upstream-commit: 5a9a435d40fb238b627c9e31858b6e31ae38ec53
Component: engine
2016-02-13 09:26:11 +01:00
98ffe8be11 Merge pull request #20198 from cpuguy83/check_drivers_b4_vol_create
Check drivers before vol create
Upstream-commit: 79edcc517231e46d1fa9e03081488527143eefae
Component: engine
2016-02-12 18:41:48 -05:00
663efc4f39 Inherit StopSignal from Dockerfile.
Make sure the image configuration is not overriden by the default
value in the `create` flag.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: a252516ec19c9c83055a882da894712f2e812ecc
Component: engine
2016-02-12 17:56:40 -05:00
697a990701 fix common misspell
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 99a396902f0ea9d81ef87a683489b2435408f415
Component: engine
2016-02-11 15:49:36 -08:00
cfb6f193ab Expose bridge IPv6 setting to docker network inspect
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: dfb00652aa801ecd7fcc3bf492434bd140d9d1ea
Component: engine
2016-02-11 22:13:47 +00:00
66b576e776 Merge pull request #20230 from estesp/zfs-ref-counting
Add proper refcounting to zfs graphdriver
Upstream-commit: 803e3d4d1e7b9f029bbe31a80197403bf4d27252
Component: engine
2016-02-11 08:27:26 -08:00
9a0f7a0e19 Add proper refcounting to zfs graphdriver
Fixes issues with layer remounting (e.g. a running container which then
has `docker cp` used to copy files in or out) by applying the same
refcounting implementation that exists in other graphdrivers like
overlay and aufs.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 922986b76e2ac596faed6a724cebcf7082174980
Component: engine
2016-02-11 01:00:54 -05:00
13ec79c31c Probe all drivers if volume driver not specified
This fixes an issue where `docker run -v foo:/bar --volume-driver
<remote driver>` -> daemon restart -> `docker run -v foo:/bar` would
make a `local` volume after the restart instead of using the existing
volume from the remote driver.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 00ec6102d993a752bd8dfb4ee393a4e58e59a4fe
Component: engine
2016-02-10 20:43:15 -05:00
e9caeb643b Merge pull request #20210 from Microsoft/jjh/hcswin32-v2
Windows: Revendor HCS to use revised error scheme
Upstream-commit: dfebb6074f62891368cb3c668380c186f3bebb33
Component: engine
2016-02-10 17:20:14 -08:00
0fe9b6b4f3 Windows: Use new error code mechanism from HCS
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 54263a93933a4a53f44ddea58ac16b2526e136e3
Component: engine
2016-02-10 14:48:24 -08:00
f35a03ff6d Windows: Fix 'isolation'
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d4b0732499feac87cf7c433b9490a4e21e94fb45
Component: engine
2016-02-10 13:19:19 -08:00
87cce96d08 Merge pull request #20205 from calavera/remove_last_daemon_references
Remove daemon dependency from api/server.
Upstream-commit: 2658341b5fe9dec5c4839f0721219111fb08b43f
Component: engine
2016-02-10 13:13:53 -08:00
5c97141da9 Remove daemon dependency from api/server.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1af76ef5970202bdbc7024d825c0fcfcc4ec6ede
Component: engine
2016-02-10 15:16:59 -05:00
c8a52b977d Windows CI: Another reliability fix
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 7853193edbd55ea5596c4df54895132ee88dc8fe
Component: engine
2016-02-10 11:07:29 -08:00
c88ca91e41 Merge pull request #20135 from vdemeester/20087-fix-since-before-filters
Fix the since and before filter behavior
Upstream-commit: 61efb4d08487623474d6c21d68b0b34a2117da67
Component: engine
2016-02-09 21:13:00 -05:00
6d4102dcb8 Merge pull request #20133 from mlaventure/dont-bind-mount-mqueue
Prevent mqueue from implicitely becoming a bind mount with --ipc=host
Upstream-commit: 0b4a7fb06d4b77265831cee1508aad9fbeddb7a2
Component: engine
2016-02-09 19:55:57 -05:00
24558a48dd Prevent mqueue from implicitely becoming a bind mount with --ipc=host
Currently, when running a container with --ipc=host, if /dev/mqueue is
a standard directory on the hos the daemon will bind mount it allowing
the container to create/modify files on the host.

This commit forces /dev/mqueue to always be of type mqueue except when
the user explicitely requested something to be bind mounted to
/dev/mqueue.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: f7d4abdc00d521509995da1070215c808fe0fd9c
Component: engine
2016-02-09 14:16:08 -08:00
26a1a8c70f cleanup attach api calls
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a77b7dd2278106b9081d0ef2260fbeea790a91ef
Component: engine
2016-02-09 14:26:51 -05:00
571e442f4c Move stream flushes to backend
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ae4ee974e80c5d650fdcbc0a6f5ab3245a7f1689
Component: engine
2016-02-09 14:25:02 -05:00
05a9f24f32 Fix the since and before filter behavior
Filters should not include stopped container if `-a` is not specified.
Right now, before and since filter are acting as --before and --since
deprecated flags. This commit is fixing that.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b41dba58a01855e0d222bd6c14af9874c298c154
Component: engine
2016-02-09 09:26:20 +01:00
0b639e2753 Fixing 'docker save' on Windows.
Save was failing file integrity checksums due to bugs in both
Windows and Docker. This commit includes fixes to file time handling
in tarexport and system.chtimes that are necessary along with
the Windows platform fixes to correctly support save. With this
change, sysfile_backups for windowsfilter driver are no longer
needed, so that code is removed.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: 041a9510c671ecf4724bf15388fdb9de549b04ed
Component: engine
2016-02-08 18:08:49 -08:00
5f7a1b8686 Merge pull request #19772 from calavera/decouple-server-routers
[Carry 19133] Decouple server routers from the daemon package.
Upstream-commit: 8c6887c54d033107d66ca70f0c84736fe4b90775
Component: engine
2016-02-08 17:54:49 -05:00
71232b661d Merge pull request #19711 from coolljt0725/fix_19679
Clean up container rootf mounts on daemon start, fixes #19679
Upstream-commit: 54b67fe12fb20bdd920d0335f70720ca3e60f505
Component: engine
2016-02-08 16:21:50 -05:00
b8acba957f Move backend types to their own package.
- Remove duplicated structs that we already have in engine-api.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 06d8f504f7b1883f490b5deda5a30ef9acd99f95
Component: engine
2016-02-08 12:42:17 -05:00
353831dee0 Decouple the "container" router from the actual daemon implementation.
This is done by moving the following types to api/types/config.go:
  - ContainersConfig
  - ContainerAttachWithLogsConfig
  - ContainerWsAttachWithLogsConfig
  - ContainerLogsConfig
  - ContainerStatsConfig

Remove dependency on "version" package from types.ContainerStatsConfig.
Decouple the "container" router from the "daemon/exec" implementation.

* This is done by making daemon.ContainerExecInspect() return an interface{}
value. The same trick is already used by daemon.ContainerInspect().

Improve documentation for router packages.
Extract localRoute and router into separate files.
Move local.router to image.imageRouter.

Changes:
  - Move local/image.go to image/image_routes.go.
  - Move local/local.go to image/image.go
  - Rename router to imageRouter.
  - Simplify imports for image/image.go (remove alias for router package).

Merge router/local package into router package.
Decouple the "image" router from the actual daemon implementation.
Add Daemon.GetNetworkByID and Daemon.GetNetworkByName.
Decouple the "network" router from the actual daemon implementation.

This is done by replacing the daemon.NetworkByName constant with
an explicit GetNetworkByName method.

Remove the unused Daemon.GetNetwork method and the associated constants NetworkByID and NetworkByName.

Signed-off-by: Lukas Waslowski <cr7pt0gr4ph7@gmail.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: dd93571c69cc5284f695a21d5504fb57b1a4891a
Component: engine
2016-02-08 11:30:57 -05:00
a385c08b38 Merge pull request #19876 from rhatdan/mqueue
Make mqueue container specific
Upstream-commit: e6573a5d18c3045fb021668f3c7539ffa52696fe
Component: engine
2016-02-08 10:57:15 -05:00
ae271f1f31 Merge pull request #20078 from cpuguy83/carry_17329
Carry 17329
Upstream-commit: 415dd8688618ac2b3872c6a5b5af3afcef2c3e10
Component: engine
2016-02-07 08:59:36 -08:00
aac2fbc608 Merge pull request #20045 from estesp/zfs-userns-permissions-fix
Fix ZFS permissions bug with user namespaces
Upstream-commit: a93cb2b856381dcedbada4fc5b3d3855cfa32fb9
Component: engine
2016-02-05 15:32:43 -08:00
a2052e7ea0 Merge pull request #20003 from liubogithub/btrfs
Graphdriver/btrfs: Avoid using single d.Get()
Upstream-commit: 25941b50206db3311f83a532ecfa8725b0b8ffab
Component: engine
2016-02-05 16:35:12 -05:00