1
0
mirror of https://github.com/docker/cli.git synced 2026-01-19 21:41:31 +03:00
Commit Graph

4777 Commits

Author SHA1 Message Date
Alexander Morozov
b6a3bf40fb Merge pull request #31136 from tonistiigi/more-locks
Add more locking to storage drivers
Upstream-commit: 1ad165dba151a76af30a8dee548d9e5689183227
Component: engine
2017-02-21 07:39:33 -08:00
Vincent Demeester
86338aa9ad Merge pull request #31159 from tonistiigi/fix-size-lock
Don’t hold container lock for size calculation
Upstream-commit: 91cffdbedb89e6164fe2ceca3d68ec039c1acc34
Component: engine
2017-02-19 16:31:21 +01:00
Tonis Tiigi
c000845b00 Don’t hold container lock for size calculation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: bd33a99acfb0e2dd02f692242237d9060e359f4a
Component: engine
2017-02-18 18:11:48 -08:00
Victor Vieux
0cc00d1673 Merge pull request #31055 from Microsoft/jjh/fix30278
Windows: Retry workaround for RS1/RS2 compute system enumeration
Upstream-commit: 7761c69e239171c6b388d53d03619eacc49338a0
Component: engine
2017-02-17 16:53:16 -08:00
Tonis Tiigi
abadc8a614 Add more locking to storage drivers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: fc1cf1911bb92def95f407364372992d57b11ca2
Component: engine
2017-02-17 15:50:25 -08:00
Victor Vieux
9d740761c3 Merge pull request #31075 from vieux/switch_to_new_versioning_scheme
Switch to new versioning scheme
Upstream-commit: cf5fe9ed0bbadc08512b485f7d1debd423fa3178
Component: engine
2017-02-17 15:43:28 -08:00
Anusha Ragunathan
00a09015ca Merge pull request #29984 from jmzwcn/issueNNP
[feature]: add daemon flag to set no_new_priv as default for unprivileged containers
Upstream-commit: 6dd2a82458016d15786b0bb12ba4cecde9b6bb90
Component: engine
2017-02-17 11:43:43 -08:00
Alexander Morozov
7b79f78433 Merge pull request #30967 from adshmh/24631-service-without-labels-returns-empty-map
Inspect output on service without labels is an empty map instead of null, fixes #24631
Upstream-commit: 0de867b315ff5734530558319b1f20238c81ba0c
Component: engine
2017-02-17 08:49:32 -08:00
Vincent Demeester
ba76fec59c Merge pull request #31069 from tonistiigi/fix-overlay2-unmount
overlay2: fix unmounting layer without merge dir
Upstream-commit: 146bc072a9bc0c52509d55a96c4324e3cee3d557
Component: engine
2017-02-17 10:21:47 +01:00
Vincent Demeester
5ecbd0e344 Merge pull request #31103 from tonistiigi/update-docs-link
Update storage driver options link
Upstream-commit: e1839ab95341fe8c40d8e8e0112fcfab38c92f3f
Component: engine
2017-02-17 09:45:31 +01:00
Tonis Tiigi
54df4712b6 Update storage driver options link
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e9864cc0ec53ae3be250cb184274ccc9349bec2d
Component: engine
2017-02-16 18:32:17 -08:00
Brian Goff
48fc06e87e Merge pull request #30618 from cpuguy83/fix_data_races
Fix some data races
Upstream-commit: 7978eef62337abc52912dd9a1901d8aa4aafa123
Component: engine
2017-02-16 21:15:21 -05:00
Brian Goff
6b0b33830b Merge pull request #31070 from cpuguy83/31060_fix_log_read_spin
Fix cpu spin waiting for log write events
Upstream-commit: 39851eac0c655d0c1911db58d4f630e2da233cac
Component: engine
2017-02-16 20:15:38 -05:00
Brian Goff
19d262d100 Merge pull request #31054 from darrenstahlmsft/WaitOOBE
Windows: Wait for OOBE to prevent crashing during host update
Upstream-commit: 7f0b833621f61072d3176d224be02ea5089761f9
Component: engine
2017-02-16 11:18:25 -05:00
Vincent Demeester
2f00829632 Merge pull request #31073 from aboch/naip
Release the network attachment on allocation failure
Upstream-commit: 55e2ed2a653f70c58206633710851ac75bc74e0b
Component: engine
2017-02-16 16:36:28 +01:00
Alessandro Boch
6224d25ac6 Release the network attachment on allocation failure
- otherwise the attachment task will stay in store and
  consume IP addresses and there is no way to remove it.

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 91820b69412e2ec9e5b3201cd5c637ca1352fd39
Component: engine
2017-02-16 05:21:06 -08:00
Daniel Zhang
3ba3328157 Add daemon flag to set no_new_priv as default for unprivileged containers.
Signed-off-by: Daniel Zhang <jmzwcn@gmail.com>
Upstream-commit: d7fda019bb7e24f42f8ae1ddecb3fd52df3c48bf
Component: engine
2017-02-16 19:05:14 +08:00
Victor Vieux
b3ec6dace6 Switch to new versioning scheme
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 47396d637781ef131fc47995756efff65ca1ccac
Component: engine
2017-02-15 23:22:50 -08:00
Brian Goff
ee71506629 Fix cpu spin waiting for log write events
This loop is not ever going to return since it's never actually setting
the `err` var except on the first iteration.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 7a179972ff963706404f91671960b144dec98d65
Component: engine
2017-02-15 21:41:32 -05:00
Tonis Tiigi
b4b0a816d9 overlay2: fix unmounting layer without merge dir
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e1af6c8a5767e38957449a1d07e56104e317191b
Component: engine
2017-02-15 17:58:12 -08:00
Darren Stahl
d0f9d01ec6 Windows: Wait for OOBE to prevent crashing during host update
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: e128a65685dafd640e32118eb1903581489f7e31
Component: engine
2017-02-15 14:01:54 -08:00
John Howard
8c67bb4bf9 Windows: Retry loop to fix HCS race condition enumerating containers
Signed-off-by: John Howard <jhoward@microsoft.com>

This fixes https://github.com/docker/docker/issues/30278 where
there is a race condition in HCS for RS1 and RS2 builds, and enumeration
of compute systems can return access is denied if a silo is being
torn down in the kernel while HCS is attempting to enumerate them.
Upstream-commit: 83a2db20977ae41325a74cf871b9e3caa92a2b7b
Component: engine
2017-02-15 11:16:24 -08:00
allencloud
3128024c49 rewrite reload code
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 75f5d63ec8414eb3d5f0a0707225b6fa7d485ce7
Component: engine
2017-02-15 21:57:27 +08:00
Arash Deshmeh
f78660f63c Fixing #24631, inspect output on swarm object types without labels is empty object {}
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 1b347cfc795407ced5eae60cb3ceadfdab8a8f4f
Component: engine
2017-02-15 01:25:55 -05:00
bingshen.wbs
347c5e8518 fix docker daemon reload bug
Signed-off-by: bingshen.wbs <bingshen.wbs@alibaba-inc.com>
Upstream-commit: 51870c7e920cef10ecb19a8d8662bcf32da4b7c5
Component: engine
2017-02-15 10:58:09 +08:00
Alexander Morozov
d39118ab1f Merge pull request #29702 from WeiZhang555/stats-all-format-name-panic
Send "Name" and "ID" when stating stopped containers
Upstream-commit: 22472c8be50ca0ddaf8207d46c6a9f5e792bd0af
Component: engine
2017-02-14 10:48:42 -08:00
Akihiro Suda
6867302948 Merge pull request #30340 from ijrandom/master
Fix #30311: dockerd leaks ExecIds on failed exec -i
Upstream-commit: eac68dbbbc7a58c20beb8d7cdcf80ade2ccebb34
Component: engine
2017-02-14 10:13:16 +09:00
Aaron Lehmann
55259ac6bb Merge pull request #30834 from allencloud/refactor-daemon-cluster-handler-and-helper
refactor cluster/helper.go and split cluster.go into multiple files
Upstream-commit: b8a3595941bd9037e2470519aab142262a0e7c49
Component: engine
2017-02-13 11:31:30 -08:00
allencloud
fe42bb3c56 create a new file swarm.go and move swarm part code from cluster.go into swarm.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 75a315d43e2577768ba5e0ef071ed9631e43ce8b
Component: engine
2017-02-12 02:54:07 +08:00
allencloud
5257b3c3b3 create a new file networks.go and move network part codes from cluster.go into networks.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 4f4151bba4eac6b6e4b47a922346fbf66120a057
Component: engine
2017-02-12 02:50:17 +08:00
allencloud
767050f4bc create a new file task.go and move task part codes from cluster.go into tasks.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 6be675c752ac511c7397fef5928af7dfda13a234
Component: engine
2017-02-12 02:45:00 +08:00
allencloud
b538436290 create a new file services.go and move service part codes from cluster.go into services.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 6ff14b48c789fa9cad050b039b08f52491955ce2
Component: engine
2017-02-12 02:43:23 +08:00
allencloud
6c9be69cc1 create a new file nodes.go and move node part codes from cluster.go into nodes.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 7591e313a4799074cee45dab43f40b583a959abb
Component: engine
2017-02-12 02:36:09 +08:00
allencloud
31a98bbb56 refactor helper.go and move getSecret to helper.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: b6fb3a56dca43f33ddbb0b38a0fc0596c8c80b46
Component: engine
2017-02-12 02:30:53 +08:00
Dmitry Shyshkin
a02b030327 Fix #303111: dockerd leaks ExecIds on failed exec -i
Signed-off-by: Dmitry Shyshkin <dmitry@shyshkin.org.ua>
Upstream-commit: 3cc0d6bb0475551687d89e7925b09f864c866a71
Component: engine
2017-02-10 21:13:00 +02:00
Zhang Wei
50715b9350 Send "Name" and "ID" when stating stopped containers
When `docker stats` stopped containers, client will get empty stats data,
this commit will gurantee client always get "Name" and "ID" field, so
that it can format with `ID` and `Name` fields successfully.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: eb3a7c232908377f4d4c0b0ec6fd35b0be138fdd
Component: engine
2017-02-09 09:46:59 +08:00
Vincent Demeester
dd8010e320 Extract daemon configuration and discovery to their own package
This also moves some cli specific in `cmd/dockerd` as it does not
really belong to the `daemon/config` package.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: db63f9370e26d725357c703cbaf9ab63cc7b6d0a
Component: engine
2017-02-08 09:53:38 +01:00
Brian Goff
7a04a9d5d0 Merge pull request #30474 from allencloud/sort-volume-drivers
sort volume drivers  and auth plugins in info response
Upstream-commit: 41650df87e55c0d018c66d0d221920f87c343391
Component: engine
2017-02-07 21:13:21 -05:00
Vincent Demeester
6b54bc16cf Merge pull request #30694 from godefroi/26937-fix-rfc5424-log-format-1
Add NILVALUE for STRUCTURED-DATA in RFC5424 logs
Upstream-commit: 14790e4008c030626eeb8886c4578441af561cf0
Component: engine
2017-02-07 23:22:39 +01:00
Vincent Demeester
c355cec53c Merge pull request #30457 from dmcgowan/distribution-reference-update-2
reference: use distribution reference and remove fork
Upstream-commit: 254fc83cba90ed79c78f4cb0cb33aeeaff492798
Component: engine
2017-02-07 22:01:25 +01:00
Daniel Nephin
6df9f2365c Merge pull request #29552 from dnephin/fix-build-with-log-driver
Ignore the daemon log config when building images
Upstream-commit: 1b4e2b7c878fb69c1c96755e21a571e6d7b8e4bb
Component: engine
2017-02-07 15:47:41 -05:00
Derek McGowan
2260389fe6 Use distribution reference
Remove forked reference package. Use normalized named values
everywhere and familiar functions to convert back to familiar
strings for UX and storage compatibility.

Enforce that the source repository in the distribution metadata
is always a normalized string, ignore invalid values which are not.
Update distribution tests to use normalized values.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 3a1279393faf78632bf169619d407e584da84b66
Component: engine
2017-02-07 11:08:37 -08:00
Yong Tang
03b9460cf3 Fix duplicate mount point for --volumes-from in docker run
This fix tries to fix the issue raised in 21845. The issue with 21845
is that if multiple `--volumes-from` with the same destination has been
specified, then one volume will be overridden by the other. This will mess
up with volumes reference and prevent the overridden volume from
being removed at the end.

Issue 21845 was observed with `docker-compose` though it is possible to
emulate the same behavior with `docker` alone:
```
$ cat Dockerfile
FROM busybox
VOLUME ["/tmp/data"]
$ docker build -t vimage .
$ docker run --name=data1 vimage true
$ docker run --name=data2 vimage true
$ docker run --name=app --volumes-from=data1 --volumes-from=data2 -d busybox top
$ docker rm -f -v $(docker ps -aq)
$ docker volume ls
$ docker volume rm ...
```
NOTE: Second case:
```
$ cat Dockerfile
FROM busybox
VOLUME ["/tmp/data"]
$ docker build -t vimage .
$ docker run --name=data1 vimage true
$ docker run --name=data2 vimage true
$ docker run --name=app --volumes-from=data1 --volumes-from=data2 -v /tmp/data:/tmp/data -d busybox top
$ docker rm -f -v $(docker ps -aq)
$ docker volume ls
$ docker volume rm ...
```
NOTE: Third case: Combination of --volumes-from and `HostConfig.Mounts` (API only)

This fix tries to address the issue by return an error if duplicate
mount points was used with `--volumes-from`.

An integration test has been added.

This fix fixes 21845.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9526e5c6aebfaf8c8d18cefa0cf44e92b7ad5f77
Component: engine
2017-02-07 08:30:56 -08:00
Vincent Demeester
e827e3506f Merge pull request #30197 from yongtang/30178-service-health-check-none
Fix issue where service healthcheck is `{}` in remote API
Upstream-commit: 09114fe9f0fcfaa97be46c3142b8b64aacc94571
Component: engine
2017-02-07 17:17:26 +01:00
Sebastiaan van Stijn
d916d66338 Merge pull request #30773 from aboch/gn
getAllNetworks unnecessary walks all the networks
Upstream-commit: 7c7be8423842768d174f9091c7adfc2e89c1a24d
Component: engine
2017-02-06 20:28:30 -08:00
Alessandro Boch
1a76374f64 getAllNetworks unnecessary walks all the networks
- libnetwork controller Networks() already returns
  a copy list. Also Networks() correctly skips any
  network which ahs already been marked for deletion
  while getNetworks implementation bypass this.

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 5d71cc01b6bb089a70fa1e855943dab0d88439bb
Component: engine
2017-02-06 16:37:51 -08:00
Victor Vieux
404093c291 Merge pull request #30732 from stevvooe/validate-mounts-at-start
cluster/executor: check mounts at start
Upstream-commit: 41864ca0ecc5c515f870cae862c286bb38cc1bf6
Component: engine
2017-02-06 15:01:48 -08:00
Alexander Morozov
3b9f4a63b1 Merge pull request #30136 from tg123/master
Windows: return err instead of panic when convert string to utf16
Upstream-commit: d38753303a60181acbf15c8e01a223f2013439c8
Component: engine
2017-02-06 14:00:00 -08:00
Stephen J Day
0ba6f88a03 cluster/executor: check mounts at start
While it is important to not create controllers for an invalid task,
certain properties should only be checked immediately before use. Early
host validation of mounts prevents resolution of the task Executor when
the mounts are not relevant to execution flow. In this case, we have a
check for the existence of a bind mount path in a creation function that
prevents a task controller from being resolved. Such early validation
prevents one from interacting directly with a controller and result in
unnecessary error reporting.

In accordance with the above, we move the validation of the existence of
host bind mount paths to the `Controller.Start` phase. We also call
these "checks", as they are valid mounts but reference non-existent
paths.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 92899ffac8ca1136e807dd234e8fa1dd49db7801
Component: engine
2017-02-06 13:09:53 -08:00
NickrenREN
5926ef0392 remove Register return value
Since Register() will never return err,remove the return value

Signed-off-by: NickrenREN <yuquan.ren@easystack.cn>
Upstream-commit: 78b50c129e06ceab460648b9c84d464b4c34cfee
Component: engine
2017-02-06 12:44:24 +08:00