From f4d26add250988f2489d66b2feb3e41a98571ff9 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Wed, 21 Dec 2016 18:06:16 -0800 Subject: [PATCH] Allow swarm join with `--availability=drain` This fix tries to address the issue raised in 24596 where it was not possible to join as manager only (`--availability=drain`). This fix adds a new flag `--availability` to `swarm join`. Related documentation has been updated. An integration test has been added. NOTE: Additional pull request for swarmkit and engine-api will be created separately. This fix fixes 24596. Signed-off-by: Yong Tang --- docs/reference/commandline/swarm_join.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/reference/commandline/swarm_join.md b/docs/reference/commandline/swarm_join.md index 0e6dadb6cb..06bba1f41d 100644 --- a/docs/reference/commandline/swarm_join.md +++ b/docs/reference/commandline/swarm_join.md @@ -22,6 +22,7 @@ Join a swarm as a node and/or manager Options: --advertise-addr string Advertised address (format: [:port]) + --availability string Availability of the node (active/pause/drain) (default "active") --help Print usage --listen-addr node-addr Listen address (format: [:port]) (default 0.0.0.0:2377) --token string Token for entry into the swarm @@ -94,6 +95,15 @@ This flag is generally not necessary when joining an existing swarm. Secret value required for nodes to join the swarm +### `--availability` + +This flag specifies the availability of the node at the time the node joins a master. +Possible availability values are `active`, `pause`, or `drain`. + +This flag is useful in certain situations. For example, a cluster may want to have +dedicated manager nodes that are not served as worker nodes. This could be achieved +by passing `--availability=drain` to `docker swarm join`. + ## Related information