Signed-off-by: Charles Smith <charles.smith@docker.com>
| ... | ... |
@@ -30,17 +30,17 @@ Example output: |
| 30 | 30 |
|
| 31 | 31 |
$ docker node inspect swarm-manager |
| 32 | 32 |
[ |
| 33 |
- {
|
|
| 34 |
- "ID": "0gac67oclbxq7", |
|
| 33 |
+ {
|
|
| 34 |
+ "ID": "e216jshn25ckzbvmwlnh5jr3g", |
|
| 35 | 35 |
"Version": {
|
| 36 |
- "Index": 2028 |
|
| 36 |
+ "Index": 10 |
|
| 37 | 37 |
}, |
| 38 |
- "CreatedAt": "2016-06-06T20:49:32.720047494Z", |
|
| 39 |
- "UpdatedAt": "2016-06-07T00:23:31.207632893Z", |
|
| 38 |
+ "CreatedAt": "2016-06-16T22:52:44.9910662Z", |
|
| 39 |
+ "UpdatedAt": "2016-06-16T22:52:45.230878043Z", |
|
| 40 | 40 |
"Spec": {
|
| 41 |
- "Role": "MANAGER", |
|
| 42 |
- "Membership": "ACCEPTED", |
|
| 43 |
- "Availability": "ACTIVE" |
|
| 41 |
+ "Role": "manager", |
|
| 42 |
+ "Membership": "accepted", |
|
| 43 |
+ "Availability": "active" |
|
| 44 | 44 |
}, |
| 45 | 45 |
"Description": {
|
| 46 | 46 |
"Hostname": "swarm-manager", |
| ... | ... |
@@ -50,38 +50,55 @@ Example output: |
| 50 | 50 |
}, |
| 51 | 51 |
"Resources": {
|
| 52 | 52 |
"NanoCPUs": 1000000000, |
| 53 |
- "MemoryBytes": 1044250624 |
|
| 53 |
+ "MemoryBytes": 1039843328 |
|
| 54 | 54 |
}, |
| 55 | 55 |
"Engine": {
|
| 56 | 56 |
"EngineVersion": "1.12.0", |
| 57 |
- "Labels": {
|
|
| 58 |
- "provider": "virtualbox" |
|
| 59 |
- } |
|
| 57 |
+ "Plugins": [ |
|
| 58 |
+ {
|
|
| 59 |
+ "Type": "Volume", |
|
| 60 |
+ "Name": "local" |
|
| 61 |
+ }, |
|
| 62 |
+ {
|
|
| 63 |
+ "Type": "Network", |
|
| 64 |
+ "Name": "overlay" |
|
| 65 |
+ }, |
|
| 66 |
+ {
|
|
| 67 |
+ "Type": "Network", |
|
| 68 |
+ "Name": "null" |
|
| 69 |
+ }, |
|
| 70 |
+ {
|
|
| 71 |
+ "Type": "Network", |
|
| 72 |
+ "Name": "host" |
|
| 73 |
+ }, |
|
| 74 |
+ {
|
|
| 75 |
+ "Type": "Network", |
|
| 76 |
+ "Name": "bridge" |
|
| 77 |
+ }, |
|
| 78 |
+ {
|
|
| 79 |
+ "Type": "Network", |
|
| 80 |
+ "Name": "overlay" |
|
| 81 |
+ } |
|
| 82 |
+ ] |
|
| 60 | 83 |
} |
| 61 | 84 |
}, |
| 62 | 85 |
"Status": {
|
| 63 |
- "State": "READY" |
|
| 86 |
+ "State": "ready" |
|
| 64 | 87 |
}, |
| 65 |
- "Manager": {
|
|
| 66 |
- "Raft": {
|
|
| 67 |
- "RaftID": 2143745093569717375, |
|
| 68 |
- "Addr": "192.168.99.118:4500", |
|
| 69 |
- "Status": {
|
|
| 70 |
- "Leader": true, |
|
| 71 |
- "Reachability": "REACHABLE" |
|
| 72 |
- } |
|
| 73 |
- } |
|
| 74 |
- }, |
|
| 75 |
- "Attachment": {},
|
|
| 76 |
- } |
|
| 88 |
+ "ManagerStatus": {
|
|
| 89 |
+ "Leader": true, |
|
| 90 |
+ "Reachability": "reachable", |
|
| 91 |
+ "Addr": "168.0.32.137:2377" |
|
| 92 |
+ } |
|
| 93 |
+ } |
|
| 77 | 94 |
] |
| 78 | 95 |
|
| 79 |
- $ docker node inspect --format '{{ .Manager.Raft.Status.Leader }}' self
|
|
| 96 |
+ $ docker node inspect --format '{{ .ManagerStatus.Leader }}' self
|
|
| 80 | 97 |
false |
| 81 | 98 |
|
| 82 | 99 |
$ docker node inspect --pretty self |
| 83 |
- ID: 2otfhz83efcc7 |
|
| 84 |
- Hostname: ad960a848573 |
|
| 100 |
+ ID: e216jshn25ckzbvmwlnh5jr3g |
|
| 101 |
+ Hostname: swarm-manager |
|
| 85 | 102 |
Status: |
| 86 | 103 |
State: Ready |
| 87 | 104 |
Availability: Active |
| ... | ... |
@@ -29,10 +29,10 @@ Lists all the nodes that the Docker Swarm manager knows about. You can filter us |
| 29 | 29 |
Example output: |
| 30 | 30 |
|
| 31 | 31 |
$ docker node ls |
| 32 |
- ID NAME STATUS AVAILABILITY MANAGER STATUS LEADER |
|
| 33 |
- 0gac67oclbxq swarm-master Ready Active Reachable Yes |
|
| 34 |
- 0pwvm3ve66q7 swarm-node-02 Ready Active |
|
| 35 |
- 15xwihgw71aw * swarm-node-01 Ready Active Reachable |
|
| 32 |
+ ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER |
|
| 33 |
+ 1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Accepted Ready Active |
|
| 34 |
+ 38ciaotwjuritcdtn9npbnkuz swarm-worker1 Accepted Ready Active |
|
| 35 |
+ e216jshn25ckzbvmwlnh5jr3g * swarm-manager1 Accepted Ready Active Reachable Yes |
|
| 36 | 36 |
|
| 37 | 37 |
|
| 38 | 38 |
## Filtering |
| ... | ... |
@@ -49,22 +49,21 @@ The currently supported filters are: |
| 49 | 49 |
|
| 50 | 50 |
### name |
| 51 | 51 |
|
| 52 |
-The `name` filter matches on all or part of a tasks's name. |
|
| 52 |
+The `name` filter matches on all or part of a node name. |
|
| 53 | 53 |
|
| 54 | 54 |
The following filter matches the node with a name equal to `swarm-master` string. |
| 55 | 55 |
|
| 56 |
- $ docker node ls -f name=swarm-master |
|
| 57 |
- ID NAME STATUS AVAILABILITY MANAGER STATUS LEADER |
|
| 58 |
- 0gac67oclbxq * swarm-master Ready Active Reachable Yes |
|
| 56 |
+ $ docker node ls -f name=swarm-manager1 |
|
| 57 |
+ ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER |
|
| 58 |
+ e216jshn25ckzbvmwlnh5jr3g * swarm-manager1 Accepted Ready Active Reachable Yes |
|
| 59 | 59 |
|
| 60 | 60 |
### id |
| 61 | 61 |
|
| 62 | 62 |
The `id` filter matches all or part of a node's id. |
| 63 | 63 |
|
| 64 |
- $ docker node ls -f id=0 |
|
| 65 |
- ID NAME STATUS AVAILABILITY MANAGER STATUS LEADER |
|
| 66 |
- 0gac67oclbxq * swarm-master Ready Active Reachable Yes |
|
| 67 |
- 0pwvm3ve66q7 swarm-node-02 Ready Active |
|
| 64 |
+ $ docker node ls -f id=1 |
|
| 65 |
+ ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER |
|
| 66 |
+ 1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Accepted Ready Active |
|
| 68 | 67 |
|
| 69 | 68 |
|
| 70 | 69 |
#### label |
| ... | ... |
@@ -76,8 +75,8 @@ The following filter matches nodes with the `usage` label regardless of its valu |
| 76 | 76 |
|
| 77 | 77 |
```bash |
| 78 | 78 |
$ docker node ls -f "label=foo" |
| 79 |
-ID NAME STATUS AVAILABILITY MANAGER STATUS LEADER |
|
| 80 |
-15xwihgw71aw * swarm-node-01 Ready Active Reachable |
|
| 79 |
+ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER |
|
| 80 |
+1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Accepted Ready Active |
|
| 81 | 81 |
``` |
| 82 | 82 |
|
| 83 | 83 |
|
| ... | ... |
@@ -26,13 +26,13 @@ Lists all the tasks on a Node that Docker knows about. You can filter using the |
| 26 | 26 |
|
| 27 | 27 |
Example output: |
| 28 | 28 |
|
| 29 |
- $ docker node tasks swarm-master |
|
| 30 |
- ID NAME SERVICE IMAGE DESIRED STATE LAST STATE NODE |
|
| 31 |
- dx2g0fe3zsdb6y6q453f8dqw2 redis.1 redis redis:3.0.6 RUNNING RUNNING 2 hours swarm-master |
|
| 32 |
- f33pcf8lwhs4c1t4kq8szwzta redis.4 redis redis:3.0.6 RUNNING RUNNING 2 hours swarm-master |
|
| 33 |
- 5v26yzixl3one3ptjyqqbd0ro redis.5 redis redis:3.0.6 RUNNING RUNNING 2 hours swarm-master |
|
| 34 |
- adcaphlhsfr30d47lby6walg6 redis.8 redis redis:3.0.6 RUNNING RUNNING 2 hours swarm-master |
|
| 35 |
- chancjvk9tex6768uzzacslq2 redis.9 redis redis:3.0.6 RUNNING RUNNING 2 hours swarm-master |
|
| 29 |
+ $ docker node tasks swarm-manager1 |
|
| 30 |
+ ID NAME SERVICE IMAGE LAST STATE DESIRED STATE NODE |
|
| 31 |
+ 7q92v0nr1hcgts2amcjyqg3pq redis.1 redis redis:3.0.6 Running 5 hours Running swarm-manager1 |
|
| 32 |
+ b465edgho06e318egmgjbqo4o redis.6 redis redis:3.0.6 Running 29 seconds Running swarm-manager1 |
|
| 33 |
+ bg8c07zzg87di2mufeq51a2qp redis.7 redis redis:3.0.6 Running 5 seconds Running swarm-manager1 |
|
| 34 |
+ dkkual96p4bb3s6b10r7coxxt redis.9 redis redis:3.0.6 Running 5 seconds Running swarm-manager1 |
|
| 35 |
+ 0tgctg8h8cech4w0k0gwrmr23 redis.10 redis redis:3.0.6 Running 5 seconds Running swarm-manager1 |
|
| 36 | 36 |
|
| 37 | 37 |
|
| 38 | 38 |
## Filtering |
| ... | ... |
@@ -53,22 +53,22 @@ The `name` filter matches on all or part of a task's name. |
| 53 | 53 |
|
| 54 | 54 |
The following filter matches all tasks with a name containing the `redis` string. |
| 55 | 55 |
|
| 56 |
- $ docker node tasks -f name=redis swarm-master |
|
| 57 |
- ID NAME SERVICE IMAGE DESIRED STATE LAST STATE NODE |
|
| 58 |
- dx2g0fe3zsdb6y6q453f8dqw2 redis.1 redis redis:3.0.6 RUNNING RUNNING 2 hours swarm-master |
|
| 59 |
- f33pcf8lwhs4c1t4kq8szwzta redis.4 redis redis:3.0.6 RUNNING RUNNING 2 hours swarm-master |
|
| 60 |
- 5v26yzixl3one3ptjyqqbd0ro redis.5 redis redis:3.0.6 RUNNING RUNNING 2 hours swarm-master |
|
| 61 |
- adcaphlhsfr30d47lby6walg6 redis.8 redis redis:3.0.6 RUNNING RUNNING 2 hours swarm-master |
|
| 62 |
- chancjvk9tex6768uzzacslq2 redis.9 redis redis:3.0.6 RUNNING RUNNING 2 hours swarm-master |
|
| 56 |
+ $ docker node tasks -f name=redis swarm-manager1 |
|
| 57 |
+ ID NAME SERVICE IMAGE LAST STATE DESIRED STATE NODE |
|
| 58 |
+ 7q92v0nr1hcgts2amcjyqg3pq redis.1 redis redis:3.0.6 Running 5 hours Running swarm-manager1 |
|
| 59 |
+ b465edgho06e318egmgjbqo4o redis.6 redis redis:3.0.6 Running 29 seconds Running swarm-manager1 |
|
| 60 |
+ bg8c07zzg87di2mufeq51a2qp redis.7 redis redis:3.0.6 Running 5 seconds Running swarm-manager1 |
|
| 61 |
+ dkkual96p4bb3s6b10r7coxxt redis.9 redis redis:3.0.6 Running 5 seconds Running swarm-manager1 |
|
| 62 |
+ 0tgctg8h8cech4w0k0gwrmr23 redis.10 redis redis:3.0.6 Running 5 seconds Running swarm-manager1 |
|
| 63 | 63 |
|
| 64 | 64 |
|
| 65 | 65 |
### id |
| 66 | 66 |
|
| 67 | 67 |
The `id` filter matches a task's id. |
| 68 | 68 |
|
| 69 |
- $ docker node tasks -f id=f33pcf8lwhs4c1t4kq8szwzta swarm-master |
|
| 70 |
- ID NAME SERVICE IMAGE DESIRED STATE LAST STATE NODE |
|
| 71 |
- f33pcf8lwhs4c1t4kq8szwzta redis.4 redis redis:3.0.6 RUNNING RUNNING 2 hours swarm-master |
|
| 69 |
+ $ docker node tasks -f id=bg8c07zzg87di2mufeq51a2qp swarm-manager1 |
|
| 70 |
+ ID NAME SERVICE IMAGE LAST STATE DESIRED STATE NODE |
|
| 71 |
+ bg8c07zzg87di2mufeq51a2qp redis.7 redis redis:3.0.6 Running 5 seconds Running swarm-manager1 |
|
| 72 | 72 |
|
| 73 | 73 |
|
| 74 | 74 |
#### label |
| ... | ... |
@@ -80,9 +80,9 @@ The following filter matches tasks with the `usage` label regardless of its valu |
| 80 | 80 |
|
| 81 | 81 |
```bash |
| 82 | 82 |
$ docker node tasks -f "label=usage" |
| 83 |
-ID NAME SERVICE IMAGE DESIRED STATE LAST STATE NODE |
|
| 84 |
-dx2g0fe3zsdb6y6q453f8dqw2 redis.1 redis redis:3.0.6 RUNNING RUNNING 2 hours swarm-master |
|
| 85 |
-f33pcf8lwhs4c1t4kq8szwzta redis.4 redis redis:3.0.6 RUNNING RUNNING 2 hours swarm-master |
|
| 83 |
+ID NAME SERVICE IMAGE LAST STATE DESIRED STATE NODE |
|
| 84 |
+b465edgho06e318egmgjbqo4o redis.6 redis redis:3.0.6 Running 10 minutes Running swarm-manager1 |
|
| 85 |
+bg8c07zzg87di2mufeq51a2qp redis.7 redis redis:3.0.6 Running 9 minutes Running swarm-manager1 |
|
| 86 | 86 |
``` |
| 87 | 87 |
|
| 88 | 88 |
|
| ... | ... |
@@ -16,6 +16,12 @@ parent = "smn_cli" |
| 16 | 16 |
|
| 17 | 17 |
Update a node |
| 18 | 18 |
|
| 19 |
+ Options: |
|
| 20 |
+ --availability string Availability of the node (active/pause/drain) |
|
| 21 |
+ --help Print usage |
|
| 22 |
+ --membership string Membership of the node (accepted/rejected) |
|
| 23 |
+ --role string Role of the node (worker/manager) |
|
| 24 |
+ |
|
| 19 | 25 |
|
| 20 | 26 |
|
| 21 | 27 |
## Related information |