From b24e516d5e8f1ee8237af1b27fd7b09ea1383f06 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig <aehlig@google.com> Date: Fri, 10 May 2013 15:52:39 +0200 Subject: [PATCH] Add example for online rolling reboots using tags 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 | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/man/hroller.rst b/man/hroller.rst index e39061d73..f7cb0f156 100644 --- a/man/hroller.rst +++ b/man/hroller.rst @@ -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 -- GitLab