Commit Graph

2184 Commits

Author SHA1 Message Date
bbee4a3aa4 Merge pull request #25013 from dnephin/remove-extraneous-aliases
Remove extraneous mount cli aliases
Upstream-commit: 95ede360e8bd857a6fad2ff0ce08093bfcd6af09
Component: engine
2016-07-27 22:51:56 +00:00
1cd561da3b Remove extraneous mount aliases.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 39a3700c01142713e88ff954e86b5dc38174511b
Component: engine
2016-07-27 15:05:31 -04:00
6a1ceaa1e1 cli: docker service|node|stack ps instead of tasks
Rather than conflict with the unexposed task model, change the names of
the object-oriented task display to `docker <object> ps`. The command
works identically to `docker service tasks`. This change is superficial.

This provides a more sensical docker experience while not trampling on
the task model that may be introduced as a top-level command at a later
date.

The following is an example of the display using `docker service ps`
with a service named `condescending_cori`:

```
$ docker service ps condescending_cori
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 13 minutes ago  Running        6c6d232a5d0e
```

The following shows the output for the node on which the command is
running:

```console
$ docker node ps self
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
b1tpbi43k1ibevg2e94bmqo0s  mad_kalam.1           mad_kalam           apline  Accepted 2 seconds ago  Accepted       6c6d232a5d0e
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 12 minutes ago  Running        6c6d232a5d0e
4x609m5o0qyn0kgpzvf0ad8x5  furious_davinci.1     furious_davinci     redis   Running 32 minutes ago  Running        6c6d232a5d0e
```

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 0aa4e1e68973ede0c73f8a4356e2a17fc903f549
Component: engine
2016-07-27 11:06:42 -07:00
37537a72ff Merge pull request #25047 from aaronlehmann/unsafe-flag-updates
service update: Don't assume existing pointers in spec are valid
Upstream-commit: f0173abd3690638589df969d8d9a76d1a524d39c
Component: engine
2016-07-26 10:14:29 +02:00
154089229d Merge pull request #25042 from tiborvass/carry-24492
Carry 24492: Remove swarm inspect and use info instead
Upstream-commit: 9ee430fcf5bd8e2afc6896bb2e0d12c1226c56c2
Component: engine
2016-07-26 01:11:37 -07:00
c877e07205 service update: Don't assume existing pointers in spec are valid
When updating values in the spec according to CLI flags, don't write
into the existing pointers. They may be nil. Instead, update them to
point to the new value we're writing.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: f9c920a1266197c2b6f0378b58f22246037fda7a
Component: engine
2016-07-25 23:56:50 -07:00
5427ebad21 Address some displaying issues in docker info
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 8ad9438edeab44c8f424113bc96fa12d76e4fdc6
Component: engine
2016-07-25 23:07:39 -07:00
eb900df556 Remove swarm inspect and use info instead
Remove the swarm inspect command and use docker info instead to display
swarm information if the current node is a manager.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e6923f6d75c2bd1b22cc1229214ffceca3251cc6
Component: engine
2016-07-25 20:31:10 -07:00
9b426d8e40 Prevent panic on update --container-label-add
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e462b4507a7020ae96ec4f4806877bff3a0cae99
Component: engine
2016-07-25 19:17:06 -07:00
0750a492c1 Add container labels to service create/update
Swarm mode makes it possible through the API to set labels to containers
but not through command line. This tries to fix it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 4031d70d1be2f02e1c9d6f7738f2a816be7eeef2
Component: engine
2016-07-25 18:57:02 -07:00
b94b8fd3fd Merge pull request #25023 from cpuguy83/25022_fix_label_panic
fix panic on --label-add
Upstream-commit: afac3361dc66b0fd0c3910f89d0d7e8156b37e24
Component: engine
2016-07-25 18:13:15 -07:00
d2f3f931f0 fix panic on --label-add
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 85bc3194aa12c19a5bd755666d1e9617dc1bb322
Component: engine
2016-07-25 19:20:44 -04:00
614fc25c93 Merge pull request #24943 from aaronlehmann/rolling-updates
Add failure action for rolling updates
Upstream-commit: c65925f24baf98455c211b4eb5c408daaaefb07a
Component: engine
2016-07-25 10:15:28 -07:00
c579261757 Merge pull request #24917 from aluzzardi/improve-service-error-reporting
service tasks: Improve error reporting
Upstream-commit: 087ca1b3b79ab032cf75543ef48bdb15cb236a33
Component: engine
2016-07-25 09:44:08 -07:00
f72c6bff06 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>
Upstream-commit: 57ae29aa74e77ade3c91b1c77ba766512dae9ab4
Component: engine
2016-07-25 08:51:19 -07:00
f82a46e7d6 make network errors less DRY
There's existing code to generate these
kind of errors, so make the errors added
in commit cc493a52a46271df82dbebea26038502b85788b9
less DRY.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3fa9d77bf312652ae04e902a2b6e73a0b91ec007
Component: engine
2016-07-25 16:22:08 +02:00
595a65bbea Merge pull request #25002 from thaJeztah/add-new-errors-to-api-docs
Add new error to API docs
Upstream-commit: e64f5f97fc9dabfaea8907cf2913bd9cd999f3f6
Component: engine
2016-07-25 16:00:36 +02:00
52cb6d0182 Merge pull request #23908 from capkurmagati/fix-docker-stats
Fix high cpu usage caused by docker stats.
Upstream-commit: 11501fa60c6600dcb38acafad3f6a86bc49af75a
Component: engine
2016-07-25 09:54:00 -04:00
a4faf39b6e Add new error to API docs
Commit cc493a52a46271df82dbebea26038502b85788b9 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>
Upstream-commit: b0089e48272f18d856ba147b393371c18d5683fb
Component: engine
2016-07-25 12:04:55 +02:00
089e283622 Merge pull request #24988 from mavenugo/snconnect
Prevent network connect/disconnect on swarm scoped networks
Upstream-commit: cc493a52a46271df82dbebea26038502b85788b9
Component: engine
2016-07-25 10:46:45 +02:00
8e3d8789cb Merge pull request #24963 from allencloud/fix-typos
fix typos
Upstream-commit: 40044cb18fd4ff0ed13d8cdd41ec4dcecdac0703
Component: engine
2016-07-25 09:39:48 +02:00
cf6ff5cc28 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>
Upstream-commit: 8f9066c468d7312af722c7cf9fc27b7c8ab79fc3
Component: engine
2016-07-24 15:34:45 -07:00
667eed7772 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>
Upstream-commit: fca0b18dcba99a7fbb8b430a55dc7bf60d5c1356
Component: engine
2016-07-24 09:23:38 -07:00
2150ea40b1 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>
Upstream-commit: a0ccd0d42fdb0dd2005f67604cb81a5a6b26787e
Component: engine
2016-07-24 09:23:07 -07:00
aa515a37b1 Merge pull request #24957 from aluzzardi/default-history-retention
CLI: Change default Swarm task history retention limit.
Upstream-commit: ca663a400ceb122f154ca4d752a2b144642372dd
Component: engine
2016-07-24 11:11:24 +02:00
66e0358be6 Merge pull request #24932 from thaJeztah/change-to-camelBack-for-consistency
Change "rotate_worker_token" to "rotateWorkerToken"
Upstream-commit: 3742557ed49048befea88125df781d5c87131e0d
Component: engine
2016-07-24 10:05:07 +02:00
7319473b2d Merge pull request #24872 from stevvooe/mount-aliases
api/client/service: mount option defaults and aliases
Upstream-commit: b8a08ddd696e2ffb3749940836406e48f1d9e2e0
Component: engine
2016-07-23 14:02:31 +02:00
1c3431e16a fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 4e959ef2f7f063803d04e06166f459257eb94b5c
Component: engine
2016-07-23 11:32:23 +08:00
12c579731c CLI: Change default Swarm task history retention limit.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: d97c0a1f253fe61957047ea4b21d9e764dc7d783
Component: engine
2016-07-22 18:09:54 -07:00
c4a861fdf5 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>
Upstream-commit: 67246afd3dbcb53fea470bd3e45578370207139d
Component: engine
2016-07-22 17:13:58 -07:00
411f901924 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>
Upstream-commit: bd81df12780b0765e55582574eaa2a125adf65fa
Component: engine
2016-07-23 01:04:12 +02:00
d557e73d7c Merge pull request #24885 from vdemeester/24875-registrauth-with
Rename `--registry-auth` to `--with-registry-auth`
Upstream-commit: 97039324c0e5621f6aa2c6e1d1c809384463e4a8
Component: engine
2016-07-22 19:05:49 +02:00
1ec535a2d9 Append --registry-auth with with
`--with-registry-auth` is more explicit.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8426f72107f351b769babadeabbf13f205126514
Component: engine
2016-07-22 10:38:56 +02:00
b9a0df62c9 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>
Upstream-commit: edd67fd4ad961f0782f1f94e6a26c95810dd037e
Component: engine
2016-07-21 19:19:11 -07:00
0f55365ad3 Reorder swarm commands
This way "join-token" appears next to "join" in the help output.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 58ba4c313b1f19dfb1d50cb32238045d7b3db91d
Component: engine
2016-07-21 18:08:41 -07:00
79e3f2c256 Merge pull request #24823 from aaronlehmann/join-tokens
Replace secrets with join tokens
Upstream-commit: f5e1f6f6880391a5a3399023cf93a3c48502e57d
Component: engine
2016-07-21 18:06:55 -07:00
03bd3e133d 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>
Upstream-commit: 634f54a047bfcd2ac95bdcdfe04da7eabe02cbec
Component: engine
2016-07-21 17:31:33 -07:00
b141a44de0 Replace secrets with join tokens
Implement the proposal from
https://github.com/docker/docker/issues/24430#issuecomment-233100121

Removes acceptance policy and secret in favor of an automatically
generated join token that combines the secret, CA hash, and
manager/worker role into a single opaque string.

Adds a docker swarm join-token subcommand to inspect and rotate the
tokens.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 2cc5bd33eef038bf5721582e2410ba459bb656e9
Component: engine
2016-07-21 15:23:03 -07:00
cafdfcad31 Merge pull request #24871 from thaJeztah/fix-wrong-case-mount-type
Change mount-types to lowercase
Upstream-commit: 0a8a6f2dd7850cc467244ba254d5e20555df99dc
Component: engine
2016-07-22 00:03:55 +02:00
5614c24f22 Merge pull request #24700 from nishanttotla/pass-registry-auth-on-deploy
Send registry auth token for service deploy
Upstream-commit: 22d020276cfd6df3482523bc680c775d6a0c57ca
Component: engine
2016-07-21 12:33:33 +02:00
acb2cc6fda Change mount-types to lowercase
these values were changed to lowercase in
690cb2d08c,
but not changed accordingly in docker/docker.

this changes the mounttypes to lowercase

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8f93128cd619e1d11be1bc0ae21f1362b1e3f9ad
Component: engine
2016-07-21 11:25:42 +02:00
3087bde702 api/client/service: shorten to volume-opt
`volume-driver-opt` was too verbose for its own existence and the sanity
of those in the vicinity. The much better, sleeker `volume-opt` replaces
it. 7 bytes and a case of carpal tunnel syndrome are saved!

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: a40b5820c91640183b40e0668f6802415e6adc14
Component: engine
2016-07-20 16:08:36 -07:00
2332ccb8c3 Send registry auth token for service deploy
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: a26bdd8607c62e6e736d06e9ec8f0908c4808d74
Component: engine
2016-07-20 16:07:07 -07:00
9e5ae213df Merge pull request #24266 from allencloud/add_cmd_docker_stack_services_STACKNAME
add command `docker stack services STACKNAME`
Upstream-commit: 2a78789ad1e5a980a6822d90d7a5039ac7af1252
Component: engine
2016-07-20 18:38:08 +02:00
76dae42c92 Rename --bundle to --file
This renames the '--bundle' flag for docker (stack) deploy
to be consistent with 'docker build'.

Note that there's no shorthand '-f' added for now,
because this may be confusing on 'docker stack config',
which also takes a file, and for which we may want to
have a '--format' flag in future.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 06f35262c47629fef78e36daaa2742c2c0d7c3a9
Component: engine
2016-07-20 16:03:27 +02:00
f9814c5993 Merge pull request #24832 from npcode/fix-service-rm-usage
Fix the usage for `service rm` command
Upstream-commit: 3d4bde92b72c963a01419c4827909e355b44e6f2
Component: engine
2016-07-20 06:44:34 -04:00
a90f40fdaf Fix the usage for service rm command
Signed-off-by: Yi EungJun <eungjun.yi@navercorp.com>
Upstream-commit: cf61cd3a920809f6a0be44a584f365544acaf1a9
Component: engine
2016-07-20 18:27:26 +09:00
fcffdb424a Merge pull request #24802 from vdemeester/stack-docs-and-flags
Add documentation for stack commands
Upstream-commit: 2ee828aac25495e2ff61d48bd81a5d70d955a06a
Component: engine
2016-07-19 14:30:49 -04:00
918c17adbd Add documentation for stack commands
Also removes the `-f` flags of bundle to follow the single-letter flags
evaluation.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 10919e890942cbdaa65f180dbcd475d21b9c6713
Component: engine
2016-07-19 18:32:44 +02:00
a764e64f97 Dont run man generation as part of test-unit.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 47cca88c8c151ebf3dd25adcf28ac1b2f75c76fb
Component: engine
2016-07-19 12:00:35 -04:00