Commit Graph

34909 Commits

Author SHA1 Message Date
1930711f45 modify foo by container in order to clarify the documentation
Signed-off-by: zebrilee <zebrilee@gmail.com>
(cherry picked from commit 2d5f9d83e7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-03 22:12:17 +02:00
c1503b058d Docs: update filter options for docker container ps
The `is-task` filter was only documented in the usage
section, but this section is not used in the documentation.

This patch adds the missing filter, synchronises the
man page source, and does some slight rephrasing
and reformatting of the filters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 46064f33f4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-03 22:12:08 +02:00
87a7a648df Merge pull request #165 from andrewhsu/ln2
re-vndr engine's libnetwork to bump_17.06.0 again
2017-08-02 18:16:09 -07:00
9b2a406435 Merge pull request #161 from alexmavr/backport-cli#362-17.06
[17.06] backport Skip inspect of built-in networks on stack deploy
2017-08-02 17:39:50 -07:00
2a1db025ff re-vndr components/cli/vendor/github.com/docker/docker from
components/engine

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-08-02 17:26:39 -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
07c249a12a Skip inspects of built-in networks on stack deploy
(cherry picked from commit 7f53c99dfe)
Signed-off-by: Alex Mavrogiannis <alex.mavrogiannis@docker.com>
2017-08-02 14:50:39 -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
939ee76a3f Move the hashing of files to its own target
So we can use it at will

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 533a843393bd7c3674074ec9af73c8e666fc7484)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-08-02 12:51:46 -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
1282b9439c Merge pull request #148 from tiborvass/fix-vendor
Add top-level `make vendor` and run it.
2017-08-02 00:16:10 -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
2e360495e8 Merge pull request #154 from thaJeztah/17.06-backport-prune-until-filter
[17.06] Error if "until" filter is combined with "--volumes" on system prune
2017-08-01 19:11:04 -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
ac0d111d0e Error if "until" filter is combined with "--volumes" on system prune
The "until" filter is supported by all object types, except for
volumes.

Before this patch, the "until" filter would attempted to be used for the volume
prune endpoint, resulting in an error being returned by the daemon, and
further prune endpoints (networks, images) to be skipped.

    $ docker system prune --filter until=24h --filter label=label.foo=bar

    WARNING! This will remove:
            - all stopped containers
            - all volumes not used by at least one container
            - all networks not used by at least one container
            - all dangling images
    Are you sure you want to continue? [y/N] y
    Error response from daemon: Invalid filter 'until'

    Calling POST /v1.30/containers/prune?filters=%7B%22label%22%3A%7B%22label.foo%3D%3Dbar%22%3Atrue%7D%2C%22until%22%3A%7B%2224h%22%3Atrue%7D%7D
    Calling POST /v1.30/volumes/prune?filters=%7B%22label%22%3A%7B%22label.foo%3D%3Dbar%22%3Atrue%7D%2C%22until%22%3A%7B%2224h%22%3Atrue%7D%7D
    Handler for POST /v1.30/volumes/prune returned error: Invalid filter 'until'
    Error response from daemon: Invalid filter 'until'

With this patch, an error is produced instead, preventing "partial" prune.

    $ docker system prune --filter until=24h --filter label=foo==bar --volumes
    ERROR: The "until" filter is not supported with "--volumes"

Note that `docker volume prune` does not have this problem, and produces an
error if the `until` filter is used;

    $ docker volume prune --filter until=24h

    WARNING! This will remove all volumes not used by at least one container.
    Are you sure you want to continue? [y/N] y
    Error response from daemon: Invalid filter 'until'

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3c095dc546)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-01 16:13:54 +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
ea04a0dd40 Run 'make vendor' to sync cli's vendored code with engine
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-07-27 03:07:38 +00: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
eafd4433aa Merge pull request #133 from thaJeztah/cli-docs-cherry-picks
[17.06] CLI reference docs cherry-picks (and 1 completion fix)
2017-07-26 16:18:23 -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
69c6f58011 Merge pull request #145 from andrewhsu/fix-tar-archive
[17.06] backport Fix tar prefix header
2017-07-26 16:07:41 -07:00
eb669c3130 Merge pull request #135 from thaJeztah/completion-cherry-picks
[17.06] Completion cherry picks
2017-07-26 15:00:12 -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
a0a268737c fixed word network on volume_ls.md
Signed-off-by: Hernan Garcia <hernandanielg@gmail.com>
(cherry picked from commit f5bca7af10)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 03:07:23 +02:00
114d979f77 Remove duplicate publish option in docker service create/update completion
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
(cherry picked from commit 6c65ba6c08)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 02:54:40 +02:00
7ee46d779c Update __docker_get_log_options completion
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
(cherry picked from commit d7ade64d29)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 02:52:54 +02:00
26ace597a5 Add zsh completion for system prune --volumes
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
(cherry picked from commit 6b256484ae)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 02:52:47 +02:00
7fd4d9d5aa Improve bash completion for service create|update --detach
bash completion usually completes boolean options that default to `true`
with the `=false` suffix because that is the only syntax that really
changes behavior.
For this option, I implemented completion falsely.

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit fc0dafbbd1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 02:52:40 +02:00
caf6943211 Refactor alias delegation in bash completion for secret rm|remove
The completion logic should be implemented in the documented subcommands
(ls, rm) and delegated to from the aliases (list, remove).
For the rm|remove pair, this was implemented vice versa.

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit d585e554d5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 02:52:33 +02:00
02a80c5c3c Add bash completion for secret inspect --pretty
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 211bd55ae7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 02:52:27 +02:00