diff options
-rw-r--r-- | templates-op/force/cluster/active/node.def | 14 | ||||
-rw-r--r-- | templates-op/force/cluster/node.def | 1 | ||||
-rw-r--r-- | templates-op/force/cluster/standby/node.def | 3 |
3 files changed, 18 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 diff --git a/templates-op/force/cluster/node.def b/templates-op/force/cluster/node.def new file mode 100644 index 0000000..3a29d81 --- /dev/null +++ b/templates-op/force/cluster/node.def @@ -0,0 +1 @@ +help: Force a cluster state transition diff --git a/templates-op/force/cluster/standby/node.def b/templates-op/force/cluster/standby/node.def new file mode 100644 index 0000000..3490960 --- /dev/null +++ b/templates-op/force/cluster/standby/node.def @@ -0,0 +1,3 @@ +help: Release cluster resources and allow a remote to become master +run: sudo /usr/share/heartbeat/hb_standby >&/dev/null + echo "Attempting to release cluster resources." |