Add example for online rolling reboots using tags
authorKlaus Aehlig <aehlig@google.com>
Fri, 10 May 2013 13:52:39 +0000 (15:52 +0200)
committerKlaus Aehlig <aehlig@google.com>
Mon, 13 May 2013 12:47:51 +0000 (14:47 +0200)
While this use case was described in the design document, and
mentioned several times as motivation for changes in commit messages,
it has never been added to a user-facing documentation. This commit
adds at least an example to the man page.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

man/hroller.rst

index e39061d..f7cb0f1 100644 (file)
@@ -94,17 +94,38 @@ Online rolling maintenances (where instance need not be shut down, but
 are migrated from node to node) are not supported yet. Hroller by design
 should support them both with and without secondary node replacement.
 
-EXAMPLE
--------
+EXAMPLES
+--------
+
+Online Rolling reboots, using tags
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Selecting by tags and getting output for one step only can be used for
+planing the next maintenance step.
+::
+
+   $ hroller --node-tags needsreboot --one-step-only -L
+   'First Reboot Group'
+    node1.example.com
+    node3.example.com
+
+Typically these nodes would be drained and migrated.
+::
+
+   $ GROUP=`hroller --node-tags needsreboot --one-step-only --no-headers -L`
+   $ for node in $GROUP; do gnt-node modify -D yes $node; done
+   $ for node in $GROUP; do gnt-node migrate -f --submit $node; done
+
+After maintenance, the tags would be removed and the nodes undrained.
+
 
-Rolling node reboot output
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+Offline Rolling node reboot output
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-With the default options, the program shows one reboot group per line as
-a comma-separated list.
+If all instances are shut down, usually larger node groups can be found.
 ::
 
-    $ hroller -L
+    $ hroller --offline-maintainance -L
     'Node Reboot Groups'
     node1.example.com,node3.example.com,node5.example.com
     node8.example.com,node6.example.com,node2.example.com