eg-updater / eg-brick-manager fast options
authorBill Erickson <berickxx@gmail.com>
Fri, 24 Jul 2015 18:34:34 +0000 (14:34 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
* Add docs fast shutdown flag -d to eg-update
* Add support for roll-fast, roll-attach-fast, and stop-fast to
  eg-brick-manager.

"fast" options skip the 30-second post-detach sleep.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/admin-scripts/eg-brick-manager.sh
KCLS/admin-scripts/eg-updater.sh

index 73e7516..d41030a 100755 (executable)
@@ -74,11 +74,18 @@ function usage {
             -a <action>
                 Short-cut for commonly used operations.
 
+                Note: "fast" options take bricks out of rotation 
+                immediately, which could interrupt active transactions.
+                Avoid use of "fast" options in production.
+
                 Supported actions:
 
                     roll         - detach, restart services + apache
+                    roll-fast    - detach w/o wait, restart services + apache
                     roll-attach  - detach, restart services + apache, attach
+                    roll-attach-fast - detach w/o wait, restart services + apache, attach
                     stop         - detach, stop services, stop apache
+                    stop-fast    - detach without wait, stop services, stop apache
                     start        - start services, start apache
                     start-attach - start services, start apache, attach.
                     detach       - detach only
@@ -122,14 +129,24 @@ function inspect_args {
     if [ -n "$ACTION" ]; then
         if [ "$ACTION" = "roll" ]; then
             EG_UPDATER_OPS="-o"
+        elif [ "$ACTION" = "roll-fast" ]; then
+            EG_UPDATER_OPS="-do"
         elif [ "$ACTION" = "roll-attach" ]; then
             if [ -n "$PROMPT_ATTACH" ]; then
                 EG_UPDATER_OPS="-og"
             else
                 EG_UPDATER_OPS="-oa"
             fi;
+        elif [ "$ACTION" = "roll-attach-fast" ]; then
+            if [ -n "$PROMPT_ATTACH" ]; then
+                EG_UPDATER_OPS="-dog"
+            else
+                EG_UPDATER_OPS="-doa"
+            fi;
         elif [ "$ACTION" = "stop" ]; then
             EG_UPDATER_OPS="-l"
+        elif [ "$ACTION" = "stop-fast" ]; then
+            EG_UPDATER_OPS="-ld"
         elif [ "$ACTION" = "start" ]; then
             EG_UPDATER_OPS="-m"
         elif [ "$ACTION" = "start-attach" ]; then
index 9ba95fb..6a8fa76 100755 (executable)
@@ -142,6 +142,9 @@ function usage {
                 $START_SLEEP.  Increase this value if autogen regularly 
                 fails.
 
+            -d  No sleep after detach.  This is useful for quickly stopping
+                an entire cluster.
+
             -u
                 Detach server (via ping.txt)