Update docs for node filter of docker service ps
As is specified in 26964, it is possible to specify
a filter based on the node name or node ID.
This fix updates the related docs for that.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit c326e0afe3
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
5dab892618
commit
3707a30459
3 changed files with 17 additions and 2 deletions
|
@ -5108,7 +5108,7 @@ List tasks
|
|||
- `id=<task id>`
|
||||
- `name=<task name>`
|
||||
- `service=<service name>`
|
||||
- `node=<node id>`
|
||||
- `node=<node id or name>`
|
||||
- `label=key` or `label="key=value"`
|
||||
- `desired-state=(running | shutdown | accepted)`
|
||||
|
||||
|
|
|
@ -5144,7 +5144,7 @@ List tasks
|
|||
- `id=<task id>`
|
||||
- `name=<task name>`
|
||||
- `service=<service name>`
|
||||
- `node=<node id>`
|
||||
- `node=<node id or name>`
|
||||
- `label=key` or `label="key=value"`
|
||||
- `desired-state=(running | shutdown | accepted)`
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ The currently supported filters are:
|
|||
|
||||
* [id](service_ps.md#id)
|
||||
* [name](service_ps.md#name)
|
||||
* [node](service_ps.md#node)
|
||||
* [desired-state](service_ps.md#desired-state)
|
||||
|
||||
|
||||
|
@ -85,6 +86,20 @@ ID NAME SERVICE IMAGE DESIRED STATE LAST S
|
|||
```
|
||||
|
||||
|
||||
#### Node
|
||||
|
||||
The `node` filter matches on a node name or a node ID.
|
||||
|
||||
```bash
|
||||
$ docker service ps -f "node=manager1" redis
|
||||
NAME IMAGE NODE DESIRED STATE CURRENT STATE
|
||||
redis.1.0qihejybwf1x5vqi8lgzlgnpq redis:3.0.6 manager1 Running Running 8 seconds
|
||||
redis.5.1x0v8yomsncd6sbvfn0ph6ogc redis:3.0.6 manager1 Running Running 8 seconds
|
||||
redis.9.3w1wu13yuplna8ri3fx47iwad redis:3.0.6 manager1 Running Running 8 seconds
|
||||
redis.10.8eaxrb2fqpbnv9x30vr06i6vt redis:3.0.6 manager1 Running Running 8 seconds
|
||||
```
|
||||
|
||||
|
||||
#### desired-state
|
||||
|
||||
The `desired-state` filter can take the values `running`, `shutdown`, and `accepted`.
|
||||
|
|
Loading…
Add table
Reference in a new issue