Commit Graph

2218 Commits

Author SHA1 Message Date
f1599dae94 Merge pull request #25455 from abronan/improve_cli_promote_demote_output
swarm: improve cli output on node promote/demote for unchanged role
Upstream-commit: 8615c8b52da0a9dfdd51f1e66f76f09d3db5defa
Component: engine
2016-08-06 09:12:46 +02:00
9d14a49a6b swarm: improve cli output on node promote/demote for unchanged role
As of now promoting (or demoting) a node that has its role
left unchanged will always print a successful message.

This PR fixes the issue by matching the behavior on swarmkit's
swarmctl command and printing a message when desired role is
the current role of the node.

As a result this also avoids calling update when it is not
necessary.

Signed-off-by: Alexandre Beslic <alexandre.beslic@gmail.com>
Upstream-commit: 5479df79c7859d5a09f42c22ddb5fa3e56ceeb7c
Component: engine
2016-08-05 15:51:32 -07:00
24a1ece9dc cli: service inspect - Null check for UpdateConfig
Fixes #25453

Signed-off-by: Dave Tucker <dt@docker.com>
Upstream-commit: 0e1fe4516fc7af03259753f6d264e91d11fe4d1a
Component: engine
2016-08-05 22:42:14 +01:00
ed50f67ff9 Merge pull request #24703 from jhorwit2/jah/#24696
Fixes #24696 - Fixes Size showing 0 in formatted ps output
Upstream-commit: 049210ce46f4929257e18e8c33fec6eda5366c10
Component: engine
2016-08-05 21:28:45 +02:00
d006708306 Merge pull request #23475 from vdemeester/add-format-flag-to-network-and-volume-ls
Add format flag to network and volume ls
Upstream-commit: 1ccd9d31372c41aaac5bc9972122348b1007ea14
Component: engine
2016-08-05 15:17:45 +02:00
fb8eea7ff0 Merge pull request #25096 from vieux/docker_plugin_remove_force
Add --force to docker plugin remove
Upstream-commit: 85428a1a53292684be55de9de3646e8c4745c72e
Component: engine
2016-08-05 14:45:05 +02:00
d5f439ee89 Add --force to docker plugin remove
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 0016b331dac94661678fd7676c7b6ccc9ec2d147
Component: engine
2016-08-04 15:55:45 -07:00
652ecddc04 Refactor dockerCli *Format to ConfigFile call
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 7c8780ea6327b1d403b13c8b144d9557b5e655e5
Component: engine
2016-08-04 15:00:00 +02:00
b837103bde Add volume --format flag to ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a488ad1a090eb0b6069f79cd045badaaa8ec1bda
Component: engine
2016-08-04 14:59:55 +02:00
33375755ad Add network --format flag to ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a8aaafc4a3fc716bdb2c4e571e34c66eb80bbab2
Component: engine
2016-08-04 14:59:51 +02:00
5f35a9dc5e Refactor api/client/formatter files
- Create container.go and image.go for specific context code
- Keep common code in formatter.go and custom.go

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e4fdbbc00bf90c5d9f87885b0c8ecd7f1d200921
Component: engine
2016-08-04 14:59:45 +02:00
9233ed872e Ignore 'not a swarm error' when inspecting a task.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fab2a3dc826ec05e7fb0dc66748b235fb4a43df6
Component: engine
2016-08-03 12:22:07 -04:00
bfaaeedf5b Convert inspect to cobra.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 851c388ad9aec0547ca7fde24c307b262eaab599
Component: engine
2016-08-03 10:36:47 -04:00
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