Commit Graph

30828 Commits

Author SHA1 Message Date
344dbf919d Merge pull request #162 from cpuguy83/lock_container_on_network_connect
[17.06] backport fix for lock container while connecting to a new network
2017-08-02 14:39:17 -07:00
aa4e506101 Merge pull request #158 from swernli/applyingReleasableLayerFix
[17.06] Fixing releaseableLayer handling of layer streams and mounts.
2017-08-02 14:07:38 -07:00
271aa92890 Lock container while connecting to a new network.
`ConnectToNetwork` is modfying the container but is not locking the
object.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 4d0888e32bccfd8c0f27a7b66b2a5607d42e2698)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-08-02 15:14:36 -04:00
9df8f75ba9 Merge pull request #160 from seemethere/increment_170601rc3
[17.06.1] bump version to 17.06.1-ce-rc3
2017-08-02 09:43:05 -07:00
7ddc25ce47 Merge pull request #157 from andrewhsu/ln
re-vndr libnetwork to latest on bump_17.06.0 branch
2017-08-01 20:28:56 -07:00
983100a0e3 Merge pull request #156 from thaJeztah/17.06-fix-swagger-default-value
[17.06.1] Fix RestartPolicy default value
2017-08-01 19:00:14 -07:00
60340beefd Fixing releaseableLayer handling of layer streams and mounts.
Original PR message:
releaseableLayer includes automatic handling for creating a read/write layer and mounting it on a call to Mount(), but then does not correspondingly unmount the layer before trying to delete it, which will fail for some graphdrivers. Commit on a releaseable layer also leaks the tarstream for the layer. To fix this, the stream close is deferred in Commit and releaseRWLayer now correctly handles unmounting the layer before trying to delete it.  In addition, the changes include better error handling in Release() to make sure that errors are returned to the caller for failures on read/write layers instead of being ignored.# Please enter the commit message for your changes. Lines starting
Cherry-Pick note:
This version of the change was edited to merge with docker-ce 17.06, which did not include the releasableLayer.Commit code, requiring that part of the merge to be removed.
(cherry picked from commit 1d457999c4540aacda68f834bdb3c6f220ce3fd5)
Signed-off-by: Stefan Wernli <swernli@ntdev.microsoft.com>
2017-08-01 20:37:38 -04:00
8dcb831f11 re-vndr libnetwork to latest on bump_17.06.0 branch
vndr github.com/docker/libnetwork

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-08-01 17:30:13 -07:00
7d230371d9 bump version to 17.06.1-ce-rc3
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-08-01 17:02:12 -07:00
2b8fb89ff3 Merge pull request #150 from abhinandanpb/predefinednet
[17.06] Changing get network request to return predefined network in swarm
2017-08-01 11:09:10 -07:00
dbe03d4016 Changing the get network request to return swarm scope predefined networks
Starting 17.06 swarm service create supports service creates with predefined
networks like host and bridge. Due to the nature of the feature, swarm manager
has a swarm scope predefined networks in addition to local scoped
predefined networks on all nodes. However network inspects for swarm scoped
predefined networks was not possible. The fix adds support for network inspect
for swarm scoped predefined networks.

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
(cherry picked from commit 5bfefb2d3662fa066ddf0d0e10cac93ee70f7ae8)
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2017-08-01 08:45:51 -07:00
08b100f7a1 Fix RestartPolicy default value
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit fc48b5529dca3907ade273921a14906be796e333)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-01 17:06:21 +02:00
ce7517d9a3 Fix awslogs driver repeating last event - #34292
Signed-off-by: Justin Menga <justin.menga@gmail.com>
(cherry picked from commit 0fd5a0bab79f20f910cb7551ec34158a32e05f5a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-01 01:01:35 +02:00
96d84243ab Merge pull request #147 from seemethere/increment_170601rc2
bump version to 17.06.1-ce-rc2
2017-07-26 17:46:11 -07:00
fb93aa0718 Merge pull request #130 from andrewhsu/fix-state-exit
[17.06] Set unpaused state when receiving 'stateExit' event
2017-07-26 17:00:19 -07:00
d5cbd105be bump version to 17.06.1-ce-rc2
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-07-26 16:51:15 -07:00
903138e5fc Merge pull request #142 from cpuguy83/cherry-pick-33960
[17.06] Fix error handling with not-exist errors on remove
2017-07-26 16:18:06 -07:00
fcc60a6e76 Merge pull request #144 from aaronlehmann/backport-34235
[17.06] cluster: Avoid recursive RLock
2017-07-26 16:17:12 -07:00
96bbcbffdc Merge pull request #134 from cyli/re-vendor-swarmkit
[17.06] Re-vendor swarmkit for various fixes
2017-07-26 16:11:21 -07:00
366839a5ac Keep pause state when restoring container's status
Do not change pause state when restoring container's
status, or status in docker will be different with
status in runc.

Signed-off-by: Fengtu Wang <wangfengtu@huawei.com>
(cherry picked from commit 977c4046fd2147d7c04f4b513a94138013ca0dd6)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-07-26 14:39:46 -07:00
b6df63d5f6 Fix error handling with not-exist errors on remove
Specifically, none of the graphdrivers are supposed to return a
not-exist type of error on remove (or at least that's how they are
currently handled).

Found that AUFS still had one case where a not-exist error could escape,
when checking if the directory is mounted we call a `Statfs` on the
path.

This fixes AUFS to not return an error in this case, but also
double-checks at the daemon level on layer remove that the error is not
a `not-exist` type of error.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit d42dbdd3d48d0134f8bba7ead92a7067791dffab)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-07-26 16:41:40 -04:00
81f2f2c3d5 archive: add test for prefix header
With docker-17.06.0 some images pulled do not extract properly. Some files don't appear in correct directories. This may or may not cause the pull to fail. These images can't be pushed or saved. 17.06 is the first version of Docker built with go1.8.

Cause

There are multiple updates to the tar package in go1.8.

https://go-review.googlesource.com/c/32234/ disables using "prefix" field when new tar archives are being written. Prefix field was previously set when a record in the archive used a path longer than 100 bytes.

Another change https://go-review.googlesource.com/c/31444/ makes the reader ignore the "prefix" field value if the record is in GNU format. GNU format defines that same area should be used for access and modified times. If the "prefix" field is not read, a file will only be extracted by the basename.

The problem is that with a previous version of the golang archive package headers could be written, that use the prefix field while at the same time setting the header format to GNU. This happens when numeric fields are big enough that they can not be written as octal strings and need to be written in binary. Usually, this shouldn't happen: uid, gid, devmajor, devminor can use up to 7 bytes, size and timestamp can use 11. If one of the records does overflow it switches the whole writer to GNU mode and all next files will be saved in GNU format.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>(cherry picked from commit 4a3cfda45e37b81211fbfbf0c45dbe64860a3ad0)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-07-26 13:30:12 -07:00
4b8be8eb56 vendor: add archive/tar
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 72df48d1ad417401a5ce0a7ee82a3c8ba33e091c)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-07-26 13:30:12 -07:00
375cbd92f2 cluster: Avoid recursive RLock
GetTasks can call GetService and GetNode with the read lock held. These
methods try to aquire the read side of the same lock. According to the
sync package documentation, this is not safe:

> If a goroutine holds a RWMutex for reading, it must not expect this or
> any other goroutine to be able to also take the read lock until the
> first read lock is released. In particular, this prohibits recursive
> read locking. This is to ensure that the lock eventually becomes
> available; a blocked Lock call excludes new readers from acquiring the
> lock.

Fix GetTasks to use the lower-level getService and getNode methods
instead. Also, use lockedManagerAction to simplify GetTasks.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit bd4f66c8f1f6ad4a2f228a957f293bc157e13d9c)
2017-07-26 11:38:23 -07:00
b0019a477a Merge pull request #127 from abhinandanpb/backport-fix-relabel
[17.06] Fixing issue with driver opt not passed to drivers
2017-07-25 18:39:35 -07:00
11cbcdbedd Update the swarmkit vendor to include the following changes:
- https://github.com/docker/swarmkit/pull/2309 (updating the service spec version when rolling back)
- https://github.com/docker/swarmkit/pull/2310 (fix for slow swarm shutdown)
- https://github.com/docker/swarmkit/pull/2323 (run watchapi server on all managers)

Signed-off-by: Ying <ying.li@docker.com>
2017-07-25 16:20:09 -07:00
627ef8c382 Merge pull request #132 from thaJeztah/docs-cherry-picks
[17.06.1] Swagger and API docs cherry-picks
2017-07-25 15:30:48 -07:00
b379923129 Merge pull request #86 from tiborvass/rc5-builder-fix
builder: fix copy —from conflict with force pull
2017-07-25 14:47:08 -07:00
513bac34fe Improve API docs for UsageData
The docs did not mention when this information
was set, and what the `-1` value indicated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 194f635ce7d097f550986bc3169ab59158f5aa68)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 02:18:02 +02:00
7b48a2700d api: Update swagger.yaml for configs
Also fix bad reference to ServiceSpec.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit ea1d14a189d62df34427b037a6d043ae3028760b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 02:17:52 +02:00
f30bfbf6c4 Fix API docs for GET /secrets/{id}, GET /secrets
The swagger.yml defined these endpoints to return
a "ServiceSpec" instead of a "SecretSpec".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f6954bea9f28c62c50b88c895968045cf801aa81)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 02:17:40 +02:00
8e88731cf2 add cluster events change in version_history.md
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit e9da15a6603f288a4c0005fc8f4161b45390e26b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 02:17:29 +02:00
9ec7c03cf2 add cluster events details in swagger.yml
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit f596fb7683227021b74d299ad1613a1e3263cf30)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 02:17:17 +02:00
e0fe1f5bf6 Service privileges: API docs
This documents the Service privileges
API changes, that were added in:
091b5e68ea735bf4e8ece708bbc8c413a32eab73

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d0a8e73e7b60f61db0c3799643aaccbbf33f3601)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 02:17:01 +02:00
82dc9301a9 Fix typo in swagger doc
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
(cherry picked from commit 56da4f2fb2509f9b2c2bc1c1c609c1dabeaec07d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 02:16:44 +02:00
4e71fcacb8 Set unpasued state when receiving 'stateExit' event
Description:
 1. start a container with restart=always.
    `docker run -d --restart=always ubuntu sleep 3`
 2. container init process exits.
 3. use `docker pause <id>` to pause this container.

if the pause action is before cgroup data is removed and after the init process died.
`Pause` operation will success to write cgroup data, but actually do not freeze any process.

And then docker received pause event and stateExit event from
containerd, the docker state will be Running(paused), but the container
is free running.

Then we can not remove it, stop it , pause it  and unpause it.

Signed-off-by: Wentao Zhang <zhangwentao234@huawei.com>
(cherry picked from commit fe1b4cfba6320793373c5397641d743d9fe94cf8)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-07-24 23:13:21 +00:00
19fe49f4b2 Merge pull request #121 from cyli/secrets-userns-fix
[17.06.1] Backport engine userns secrets-mounting fix
2017-07-24 14:33:01 -07:00
8bdf679283 Merge pull request #117 from tiborvass/fix-live-restore
[engine] Graceful upgrade of containerd and runc state files upon live-restore
2017-07-24 14:18:26 -07:00
8ea396ed7f Fixing issue with driver opt not passed to drivers
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
(cherry picked from commit bcb55c62024419a2f8fa7679e1e068cc43425636)
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2017-07-24 10:58:01 -07:00
358c36e930 [engine] Graceful upgrade of containerd and runc state files upon live-restore
Vendors new dependency github.com/crosbymichael/upgrade

Signed-off-by: Tibor Vass <tibor@docker.com>
2017-07-22 05:54:46 +00:00
51acf33ae3 builder: fix copy —from conflict with force pull
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit e430b58811813084df2b9f8b1a9e929114b2187a)
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-07-22 05:38:21 +00:00
b31456f2cb In the case of remounting with changed data, need to call mount
The case where we are trying to do a remount with changed filesystem specific options was missing,
we need to call `mount` as well here to change those options.

See #33844 for where we need this, as we change `tmpfs` options.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit 3a1ab5b479ce843648cf676fbaaf2bec9e040dce)
Signed-off-by: Ying <ying.li@docker.com>
2017-07-18 11:38:49 -07:00
c257617b99 Merge pull request #118 from andrewhsu/rc1
bump version to 17.06.1-ce-rc1
2017-07-13 16:03:01 -07:00
06f434c72b Merge pull request #108 from andrewhsu/fix-load-image
[17.06] backport fix "Stop trying to load images on an incompatible OS"
2017-07-13 12:04:27 -07:00
1d1b9ad4db Merge pull request #115 from andrewhsu/set-ping-ver
[17.06] Set ping version even on error
2017-07-13 11:59:16 -07:00
ab734f59cc Merge pull request #105 from andrewhsu/backport-doc-fixes
[17.06] backport various docs fixes
2017-07-13 11:54:25 -07:00
b538302e2c Merge pull request #90 from andrewhsu/fix-leak
[17.06] Prevent a goroutine leak when healthcheck gets stopped
2017-07-13 13:58:07 +02:00
021cd82205 import runtime so cherry-pick moby/moby@b9255e4 can work
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-07-13 04:26:09 +00:00
10aa812ef5 Set ping version even on error
In some cases a server may return an error on the ping response but
still provide version details. The client should use these values when
available.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 27ef09a46ffeb8ba42548de937b68351009f30ea)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-07-13 03:55:49 +00:00
fb319d1554 Merge pull request #114 from cyli/re-vendor-swarmkit
[17.06] backport (swarmkit) cluster update and memory issue fixes
2017-07-12 17:34:49 -07:00