Commit graph

25471 commits

Author SHA1 Message Date
Nishant Totla
25cf7999fa Using map to list plugins in node description
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit feedb7ab5a)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-26 01:49:29 -07:00
Madhu Venugopal
678a19ef6b improve error message when using ineligible network with service create
Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 40c88b8c54)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:27:41 -07:00
Stephen J Day
027de801a8 swarm/controller: allow cancellation to propagate
Ensure that cancellation of a pull propagates rather than continuing to
container creation. This ensures that the `Prepare` method is properly
re-entrant.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit d99c6b837f)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:26:42 -07:00
Brian Goff
07735b4f0c fix panic on --label-add
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 85bc3194aa)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:47 -07:00
runshenzhu
84eae5d69f extend health check to start service
Signed-off-by: runshenzhu <runshen.zhu@gmail.com>
Signed-off-by: Runshen Zhu <runshen.zhu@gmail.com>
(cherry picked from commit a99db84b4a)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:47 -07:00
Tibor Vass
0df31ff193 healthcheck: do not interpret exit code 2 as "starting"
Instead reserve exit code 2 to be future proof, document that it should
not be used. Implementation-wise, it is considered as unhealthy, but
users should not rely on this as it may change in the future.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 91e9f38313)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:47 -07:00
Nishant Totla
bf024205b7 Sort plugin names in node description
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit 227c7e4e8d)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:47 -07:00
Alexandre Beslic
365d16ed6d swarm docs: add administration guide for Managers and Raft
This adds a guide with recommendations on how to setup
Managers and keep the Swarm cluster healthy.

Signed-off-by: Alexandre Beslic <alexandre.beslic@gmail.com>
(cherry picked from commit 24f87f26e7)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:46 -07:00
Charles Smith
bd31863ba7 add run swarm mode guide
Signed-off-by: Charles Smith <charles.smith@docker.com>
(cherry picked from commit c406711cc0)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:46 -07:00
Aaron Lehmann
a3639e6ac6 Add failure action for rolling updates
This changes the default behavior so that rolling updates will not
proceed once an updated task fails to start, or stops running during the
update. Users can use docker service inspect --pretty servicename to see
the update status, and if it pauses due to a failure, it will explain
that the update is paused, and show the task ID that caused it to pause.
It also shows the time since the update started.

A new --update-on-failure=(pause|continue) flag selects the
behavior. Pause means the update stops once a task fails, continue means
the old behavior of continuing the update anyway.

In the future this will be extended with additional behaviors like
automatic rollback, and flags controlling parameters like how many tasks
need to fail for the update to stop proceeding. This is a minimal
solution for 1.12.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 57ae29aa74)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:43 -07:00
Aaron Lehmann
92cbdfece9 Revendor engine-api
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 3585026c3a)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:37 -07:00
Josh Horwitz
c166b2c9da Treat HEALTHCHECK NONE the same as not setting a healthcheck
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
(cherry picked from commit 4016038bd3)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:37 -07:00
Aanand Prasad
a688a0ae9d Add note about --entrypoint overriding default command
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
(cherry picked from commit 2b7548f972)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:37 -07:00
Anusha Ragunathan
52b078fb37 Handle plugin shutdown when liveRestore is set.
When daemon has liveRestore set, daemon shutdown should not shutdown
plugins. Fixes #24759

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 4a44cf1d4c)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:37 -07:00
Kenfe-Mickael Laventure
47b7cf5ceb Fix missing unlock in libcontainerd.Restore()
This was preventing the "exit" event to be correctly processed during
the restore process without live-restore enabled.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit ac068a1f9d)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:37 -07:00
Kenfe-Mickael Laventure
6142557cba Prepend libcontainerd log message with "libcontainerd:"
This will make it easier to pinpoint error messages in the daemon
logs.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit 5231c55346)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:21:14 -07:00
Andrea Luzzardi
42e97d23e2 service tasks: Improve error reporting
- Tasks will display all tasks (`-a` is the default and was removed)
- Nest tasks to help display history
- Display task errors inline

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
(cherry picked from commit edd67fd4ad)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:29 -07:00
Sebastiaan van Stijn
ec241bfeaf make network errors less DRY
There's existing code to generate these
kind of errors, so make the errors added
in commit cc493a52a4
less DRY.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3fa9d77bf3)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:28 -07:00
Zhang Wei
861fa09131 small nit: fix unmeaningful log
Truncated dir name can't give any useful information, print whole dir
name will.

Bad debug log is like this:

```
DEBU[2449] aufs error unmounting /var/lib/doc: no such file or directory
```

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
(cherry picked from commit af8359562c)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:28 -07:00
Sebastiaan van Stijn
e9190e0764 Add new error to API docs
Commit cc493a52a4 added
a constraint to network connect/disconnect operations
on "Swarm scoped" networks.

This adds those errors to the API documentation. Also
changes the error to lowercase for consistency.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b0089e4827)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:23 -07:00
Tianyi Wang
14038215d3 Fix high cpu usage caused by docker stats.
Signed-off-by: Tianyi Wang <capkurmagati@gmail.com>
(cherry picked from commit 54e8beec9b)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:16 -07:00
Tadej Janež
82219c7727 Expand instructions on using systemd to manage containers
Signed-off-by: Tadej Janež <tadej.j@nez.si>
(cherry picked from commit c8a99a5054)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:16 -07:00
Madhu Venugopal
c6ff464d43 Vendoring libnetwork for rc5
Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 56b78ab2f2)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:15 -07:00
Madhu Venugopal
71d54a4bd3 Prevent network connect/disconnect on swarm scoped networks
Swarm handles service updates quite differently and also it doesnt
support worker driver network operations. Hence prevent containers from
connecting to swarm scoped networks

Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 8f9066c468)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:15 -07:00
Everett Toews
beffc3e8c0 Fix AuthzPlugin URL fragment in docs
These docs have AuthzPlugin with a lower case 'z'. What the plugin
api is actually looking for is AuthZPlugin with an upper case 'Z'.

See 46e3a249a1/pkg/authorization/api.go (L5-L8)

Signed-off-by: Everett Toews <everett.toews@rackspace.com>
(cherry picked from commit c42fbc6b09)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:15 -07:00
John Starks
43193233f8 Windows: Restore console mode on set mode failure
SetConsoleMode() on input handles appears to remember invalid bits that
were set, causing problems for other programs (such as xcopy.exe) trying
to set the console mode after docker.exe has exited. Always restore
the input console mode on set failure.

Signed-off-by: John Starks <jostarks@microsoft.com>
(cherry picked from commit 83c186fdd4)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:15 -07:00
allencloud
4cd455a8d9 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 4e959ef2f7)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:15 -07:00
Steve Durrheimer
5aef7cc12d Add zsh completion for 'docker swarm join-token' command
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit a04bba8b89)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:14 -07:00
Madhu Venugopal
1cc85c1726 Daemon changes to pass exec-root to libnetwork
This is required to make the libnetwork's namespace mgmt
directory configurable

Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit d3af5e3d4b)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:14 -07:00
Aaron Lehmann
a0d1201e02 Require listen address and advertise address to be an IP address or an interface name
Hostnames are not supported for now because libnetwork can't use them
for overlay networking yet.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit fca0b18dcb)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:12 -07:00
Aaron Lehmann
762a73bf7f Split advertised address from listen address
There are currently problems with "swarm init" and "swarm join" when an
explicit --listen-addr flag is not provided. swarmkit defaults to
finding the IP address associated with the default route, and in cloud
setups this is often the wrong choice.

Introduce a notion of "advertised address", with the client flag
--advertise-addr, and the daemon flag --swarm-default-advertise-addr to
provide a default. The default listening address is now 0.0.0.0, but a
valid advertised address must be detected or specified.

If no explicit advertised address is specified, error out if there is
more than one usable candidate IP address on the system. This requires a
user to explicitly choose instead of letting swarmkit make the wrong
choice. For the purposes of this autodetection, we ignore certain
interfaces that are unlikely to be relevant (currently docker*).

The user is also required to choose a listen address on swarm init if
they specify an explicit advertise address that is a hostname or an IP
address that's not local to the system. This is a requirement for
overlay networking.

Also support specifying interface names to --listen-addr,
--advertise-addr, and the daemon flag --swarm-default-advertise-addr.
This will fail if the interface has multiple IP addresses (unless it has
a single IPv4 address and a single IPv6 address - then we resolve the
tie in favor of IPv4).

This change also exposes the node's externally-reachable address in
docker info, as requested by #24017.

Make corresponding API and CLI docs changes.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit a0ccd0d42f)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:03 -07:00
Aaron Lehmann
38beb3d9ab Vendor libnetwork and github.com/vishvananda/netlink
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 24d2d53f5d)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:35 -07:00
Aaron Lehmann
ea9d74b755 Revendor swarmkit
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit d626875a94)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:34 -07:00
Vincent Demeester
6db1c73da7 Update swarm init task-history-limit docs
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 180f8c61bb)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:34 -07:00
Andrea Luzzardi
e6464aa5ab CLI: Change default Swarm task history retention limit.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
(cherry picked from commit d97c0a1f25)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:34 -07:00
Sebastiaan van Stijn
723073bccb bump engine-api to ebb728a1346926edc2ad9418f9b6045901810b20
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9a3e47511a)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:34 -07:00
Sebastiaan van Stijn
b7a38b19b3 Change "rotate_worker_token" to "rotateWorkerToken"
This renames the `rotate_xxx` flags to camelBack, for
consistency with other API query-params, such as
`detachKeys`, `noOverwriteDirNonDir`, and `fromImage`.

Also makes this flag accept a wider range of boolean
values ("0", "1", "true", "false"), and throw an error
if an invalid value is passed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit bd81df1278)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:26 -07:00
Stephen J Day
986a968044 api/client/service: mount option defaults and aliases
Simplifies the mount option usage by providing common aliases for
`source` and `target`. The default mount type is now volume.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 634f54a047)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:08 -07:00
Alessandro Boch
9e006577f4 Fix regression on --link on bridge network
Signed-off-by: Alessandro Boch <aboch@docker.com>
(cherry picked from commit 3a3f800ff4)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:08 -07:00
Aaron Lehmann
1bb38f1a2b Update --update-parallelism docs
Update documentation to account for the changes in #24952.

docs/swarm/swarm-tutorial/rolling-update.md doesn't need any changes,
but the CLI reference pages should show the current help text.
drain-node.md no longer needs to specify --update-parallelism 1 in its
example.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 933ba8d7f7)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:08 -07:00
Stephen J Day
16744cb970 api/client/service: default update parallelism to 1
When updates happen, the current behavior is to kill all running
instances and dispatch new tasks. Common use cases for container updates
involve small numbers of containers, meaning the app will go down on
most updates. Setting parallelism to 1 ensures that at most one task
will go down during the update. Services with higher replica counts can
increase this number accordingly to meet their needs.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 67246afd3d)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:08 -07:00
Sebastiaan van Stijn
98f1c30e8c Remove "secrets" leftovers from docs
f5e1f6f688 replaced "secrets"
with "join tokens", which also removed the "auto-accept"
policy.

This removes some remaining references to those features.

Note that there are other references, but those
are already addressed in another pull request.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 987511712f)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:06 -07:00
Harald Albers
ac6d5a01c1 bash completion for docker swarm join-token
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 42b4d6ebe4)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:02 -07:00
Charles Smith
fa89f32b13 updates get started with swarm to use join-token
Signed-off-by: Charles Smith <charles.smith@docker.com>
(cherry picked from commit 9ac145d736)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:01 -07:00
Vincent Demeester
9ec67fd8d1 Append --registry-auth with with
`--with-registry-auth` is more explicit.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 8426f72107)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:01 -07:00
Aaron Lehmann
7836221015 Reorder swarm commands
This way "join-token" appears next to "join" in the help output.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 58ba4c313b)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:01 -07:00
Sebastiaan van Stijn
83e40c5025 remove "secrets" from completion scripts
Swarm join has been changed in f5e1f6f688,
removing various options and the "node accept" command.

This removes the removed options from the completion
scripts.

NOTE: a new command ("docker swarm join-token") was
also added, but is not part of this commit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c4ab20c5f8)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:01 -07:00
Yong Tang
c6cd4b37c7 Update the errNoManager() to conform to swarm join-token
In 24823, `swarm join` has been updated to take a `--token`
flag and flag `--manager` has been removed. Though in errNoManager()
the error message still use the old description.

This fix update the error message in errNoManager() and conforms
to the current available flags.

This fix is related to 24823.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 3d30155735)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:01 -07:00
Justin Cormack
adeba99c7f Make README less scabious
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit b2ad59e7bd)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:01 -07:00
Aaron Lehmann
b738f3f3e5 Revendor swarmkit
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit aaa0f0b246)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:00 -07:00