From: Bill Erickson Date: Fri, 24 Jul 2015 18:34:34 +0000 (-0400) Subject: eg-updater / eg-brick-manager fast options X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e2462b7242538f53f0ab403a7ae641a2118e5432;p=working%2FEvergreen.git eg-updater / eg-brick-manager fast options * 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 --- diff --git a/KCLS/admin-scripts/eg-brick-manager.sh b/KCLS/admin-scripts/eg-brick-manager.sh index 73e7516dfa..d41030af34 100755 --- a/KCLS/admin-scripts/eg-brick-manager.sh +++ b/KCLS/admin-scripts/eg-brick-manager.sh @@ -74,11 +74,18 @@ function usage { -a 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 diff --git a/KCLS/admin-scripts/eg-updater.sh b/KCLS/admin-scripts/eg-updater.sh index 9ba95fb648..6a8fa7638d 100755 --- a/KCLS/admin-scripts/eg-updater.sh +++ b/KCLS/admin-scripts/eg-updater.sh @@ -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)