diff options
Diffstat (limited to 'templates-op/force/cluster/active/node.def')
-rw-r--r-- | templates-op/force/cluster/active/node.def | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/templates-op/force/cluster/active/node.def b/templates-op/force/cluster/active/node.def new file mode 100644 index 0000000..d610277 --- /dev/null +++ b/templates-op/force/cluster/active/node.def @@ -0,0 +1,14 @@ +help: Attempt to take over cluster resources and become the active node +run: local -a grp ; + local -a params ; + eval "grp=($(cli-shell-api listActiveNodes cluster group))" + if [ -n "$grp" ]; then + params=($(cli-shell-api returnActiveValue cluster group $grp auto-failback)) + if [ "$params" == "true" ]; then + echo "Warning: Auto-failback is configured." + fi + sudo /usr/share/heartbeat/hb_takeover >&/dev/null + echo "Requesting to take over cluster resources." + else + echo "Clustering is not configured." + fi |