Commit Graph

2204 Commits

Author SHA1 Message Date
86ea274c7e Mask join tokens in daemon logs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e3917c76ce6f75e6c12cd2099d403fdaba8ab218
Component: engine
2016-08-02 15:15:23 -07:00
4427fb747e Merge pull request #25345 from dperny/fix-service-inspect-pretty
Fix missing newline in service inspect --pretty
Upstream-commit: 404705fd8e5465dd3e314d04c11cb299c195dd52
Component: engine
2016-08-02 17:50:28 -04:00
15ac980cd0 Merge pull request #25159 from diogomonica/adding-force-to-node-remove
Adding force to node rm
Upstream-commit: 10ae908bfa88bf128ce416067391ed125ad0f1be
Component: engine
2016-08-02 22:49:15 +02:00
37e0314e79 Fix missing newline in service inspect --pretty
Printing off networks as part of --pretty was missing a newline, causing
the next thing printed to be concatenated onto the end of the line.
Added an empty println after all networks are printed.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 02ebaf364ff0463c65d63fd1c3c11840a578fc45
Component: engine
2016-08-02 13:27:35 -07:00
d76a57b54d Merge pull request #25308 from thaJeztah/join-token-refactor
Improve swarm join-token instructions
Upstream-commit: 3d28cdd2f5e91e042848321de4cc4dff6735d84d
Component: engine
2016-08-02 18:57:37 +02:00
f03613aded Improve swarm join-token instructions
this change improves the instructions for
swarm join-token and swarm init;

- only print the join-token command for workers
  instead of for both managers and workers, to
  prevent users from copying the wrong command.
  An extra line is added to explain how to obtain
  the manager token.
- print a message that a token was rotated
  sucesfully if '--rotate' is used.
- add some extra white-space before / after
  the join commands, to make copy/pasting
  easier.

this change also does some refactoring of join-token;

- move flagname-constants together with other constants
- use variables for selected role ("worker" / "manager")
  to prevent checking for them multiple times, and to
  keep the "worker" / "manager" sting centralized
- add an extra blank line after "join-token" instructions
  this makes it easier to copy, and cleans up the
  code a tiny bit

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ebebd4176940bc907ba4e8f5fbe62f6a050f8ed4
Component: engine
2016-08-02 16:44:02 +02:00
96d8037700 Update docs in docker service create/update for flag --user
In `docker service create/update`, flag `--user` actually supports
`uid:gid` (same as `docker run`). However, this is not reflected
in the help and documentation yet.

This fix updates docs in `docker service create/update` to change
the description to `Username or UID (format: <name|uid>[:<group|gid>])`.

The help message output has also been updated.

This fix is related to 25304.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 80a3755a8f9eac577b65c3403bcbb23a120e6585
Component: engine
2016-08-02 07:01:16 -07:00
0e5400a423 Add --force to node removal
Signed-off-by: Diogo Monica <diogo.monica@gmail.com>
Upstream-commit: a327c231b5c68c13b7dcde2fdc83b8e4cec59c43
Component: engine
2016-08-01 18:55:58 -07:00
c99b7360ea Merge pull request #25204 from yongtang/25195-docker-info-ca-configuration
Output external CAs in swarm mode with `docker info`
Upstream-commit: 8f78dae4e308e47eb6cdba643c995a8a9b46b0cd
Component: engine
2016-08-01 21:34:00 -04:00
0883d55bb8 Replace "workdir' with const, same as other flags in service create
This is a minor fix that tries to replace `"workdir"` with const in `service create`.

Since `"workdir"` is the only string not defined as const in `func addServiceFlags()`,
I think it makes sense to replace `"workdir"` with a const to be consistent.

The flag `"workdir"` in `service update` has also been replaced.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 55d05fc0556dc7d3ff3c65b8d739e48a1f79afab
Component: engine
2016-08-01 11:45:28 -07:00
a1efc2cd7a Output external CAs in swarm mode with docker info
This fix tries to address the issue raised in 25195 where external
CA configurations are not present in `docker info`.

This fix adds the output of external CAs in `docker info` in swarm
mode.

The test is done manually with:
```
docker run -p 8888:8888 -e CXFSSL_ADDRESS=0.0.0.0 -d fabric8/cfssl
docker swarm init --external-ca protocol=cfssl,url=http://172.17.0.2:8888
```

The `docker info` output:
```
 Managers: 1
 Nodes: 1
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot interval: 10000
  Heartbeat tick: 1
  Election tick: 3
 Dispatcher:
  Heartbeat period: 5 seconds
 CA configuration:
  Expiry duration: 3 months
  External CAs:
    cfssl: https://172.17.0.2:8888
```

This fix fixes 25195.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 995128e9ebfc1a84bbfe8765d3642f132a4f630d
Component: engine
2016-07-30 09:14:16 -07:00
b87e70e358 update command description in CLI
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 6c5988ed8c654527ee8dbae26d5618297f038cef
Component: engine
2016-07-31 00:06:18 +08:00
b84877b065 uppercase output in docker info related to swarm mode
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: ac13162464f4f80a274d075dca41c2da4d3d73be
Component: engine
2016-07-30 10:14:44 +08:00
e8d1954574 Merge pull request #24365 from xianlubird/bug/network-list
Change buildEndpointResource params avoid repeat visits resource
Upstream-commit: 6bf2db574bb7482b7abce23ef992ff15b6011458
Component: engine
2016-07-29 14:54:05 -04:00
bb300af70f Merge pull request #23759 from AkihiroSuda/cobraexec
Migrate exec command to cobra
Upstream-commit: 3d42bf5f120b6cbd38b54f71dff4343c316939a0
Component: engine
2016-07-29 07:41:02 +02:00
feb2160968 Merge pull request #24986 from mlaventure/add-live-restore-to-info
Add live restore to info
Upstream-commit: faf9dac22c902701eeae26cabaedea6d91e01bd5
Component: engine
2016-07-29 07:37:56 +02:00
d22f93678b Migrate exec command to cobra
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 9d9dff3d0d9e92adf7c2e59f94c63766659d1d47
Component: engine
2016-07-29 02:10:36 +00:00
e1f42120bb Add live-restore state to docker info output
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 189aaf8aea953c591f36ac340ad96def1131e869
Component: engine
2016-07-28 17:10:40 -07:00
a867691c0e service ls: Show tasks from nodes that are not down, not only "ready" nodes
Currently, the counter only shows tasks on READY nodes. It's more
correct to also count nodes in the other states except DOWN, because
the tasks assocated with those nodes are still assumed to be running for
orchestration purposes. One example of when this could matter is during
a leader failover when agents are in the process of reconnecting.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 614ad95fbbb7d9f94369a722cb7f557286293fc5
Component: engine
2016-07-28 11:44:28 -07:00
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