Commit Graph

30847 Commits

Author SHA1 Message Date
34d73cd0d8 Merge pull request #206 from andrewhsu/rc1
[17.06] bump version to 17.06.2-ce-rc1
2017-08-28 11:52:32 -07:00
5f8026ab88 vndr swarmkit to bring in fix for PullOptions
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-08-25 11:29:33 -07:00
6988f4f23f Merge pull request #200 from vieux/fix-dm-cookie
[17.06] devmapper: ensure that UdevWait is called after calls to setCookie
2017-08-23 16:31:25 -07:00
7294ad7f3c bump version to 17.06.2-ce-rc1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-08-22 15:35:14 -07:00
4661389bd3 Fix error removing diff path
In d42dbdd3d48d0134f8bba7ead92a7067791dffab the code was re-arranged to
better report errors, and ignore non-errors.
In doing so we removed a deferred remove of the AUFS diff path, but did
not replace it with a non-deferred one.

This fixes the issue and makes the code a bit more readable.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 276b44608b04f08bdf46ce7c816b1f744bf24b7d)

Conflicts:
	components/engine/daemon/graphdriver/aufs/aufs.go

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-08-22 11:47:42 -07:00
d25b1a3913 devmapper: ensure that UdevWait is called after calls to setCookie
Recent changes to devmapper broke the implicit requirement that UdevWait be
called after every call to task.setCookie.  Failure to do so results in leaks of
semaphores in the LVM code, eventually leading to semaphore exhaustion.
Previously this was handled by calling UdevWait in a ubiquitous defer function.
While there was initially some concern with deferring the UdevWait function
would cause some amount of race possibiliy, the fact that we never return the
cookie value or any value used to find it, makes that possibility seem unlikely,
so lets go back to that method

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
(cherry picked from commit 23dcfec1404411489e23fb9b76fc7096db139d04)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-08-17 15:54:52 -07:00
29d9279ad4 bump version to 17.06.1-ce
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-08-17 10:56:19 -07:00
4770c7af51 vndr libnetwork to bring in fix for overlay network ip reuse
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-08-16 21:22:27 -07:00
904cba3a81 bump version to 17.06.1-ce-rc4
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-08-08 01:10:31 -07:00
c1e16c7489 Merge pull request #179 from thaJeztah/17.06-backport-fix_api_server_null
[17.06] Fix api server null pointer def on inspect/ls null ipam-driver networks
2017-08-08 01:08:24 -07:00
df3f5ebc1e Merge pull request #169 from thaJeztah/17.06-docs-cherry-picks
[17.06] docs cherry picks
2017-08-08 00:55:52 -07:00
54ed530fdd Merge pull request #166 from andrewhsu/fix-plugin
[17.06] backport Make plugins dir private
2017-08-08 00:51:27 -07:00
d44a878765 Merge pull request #185 from fcrisciani/ln-vnd-17.06
[17.06] vndr libnetwork to latest bump_17.06
2017-08-07 23:59:31 -07:00
797ee59557 [17.06] vndr libnetwork to latest bump_17.06
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-08-07 11:46:02 -07:00
db53a4b0a9 Fix when containerd restarted, event handler may exit
Description:
Kill docker-containerd continuously, and use kill -SIGUSR1 <dockerpid>
to check docker callstacks. And we will find that event
handler: startEventsMonitor or handleEventStream will exit.

This will only happen when system is busy, containerd need more time to
startup, and the monitor gorotine maybe exit.

Signed-off-by: Wentao Zhang <zhangwentao234@huawei.com>
(cherry picked from commit 02ce73f62e73e78a4ec29b29fb2ba552221fe885)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-05 17:55:24 +02:00
280ee18747 Fix api server null pointer def on inspect/ls null ipam-driver networks
- When a network is created with the null ipam driver, docker api server
  thread will deference a nil pointer on `docker network ls` and on
  `docker network inspect <nw>`. This because buildIpamResource()
  assumes a gateway address is always present, which is not correct.

Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
(cherry picked from commit beebfc0cf6240c8af511eb4d7e29314c8de6ddf2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-04 13:33:08 +02:00
2867d1282c Update API plugin response examples
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4735c7663201ce1bf618e2aa505d7813a331be3f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-03 22:13:06 +02:00
afe2c1b4bc Make plugins dir private.
This prevents mounts in the plugins dir from leaking into other
namespaces which can prevent removal (`device or resource busy`),
particularly on older kernels.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 0c2821d6f2de692d105e50a399daa65169697cca)

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-08-02 18:05:13 -07:00
7cd7d0794f re-vndr engine's libnetwork to bump_17.06.0 again
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-08-02 17:08:02 -07:00
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