|
|
17b94a |
From bfbda24746bf11573b485baf534a5cf1373c6c89 Mon Sep 17 00:00:00 2001
|
|
|
17b94a |
From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com>
|
|
|
17b94a |
Date: Wed, 7 Jun 2017 08:15:48 -0400
|
|
|
17b94a |
Subject: [PATCH 074/124] common-ha: enable pacemaker at end of setup
|
|
|
17b94a |
|
|
|
17b94a |
Label: DOWNSTREAM ONLY
|
|
|
17b94a |
|
|
|
17b94a |
Change-Id: I3ccd59b67ed364bfc5d27e88321ab5b9f8d471fd
|
|
|
17b94a |
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
|
|
|
17b94a |
Reviewed-on: https://code.engineering.redhat.com/gerrit/108431
|
|
|
17b94a |
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
|
|
|
17b94a |
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
17b94a |
Reviewed-on: https://code.engineering.redhat.com/gerrit/167159
|
|
|
17b94a |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
17b94a |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
17b94a |
---
|
|
|
17b94a |
extras/ganesha/scripts/ganesha-ha.sh | 20 ++++++++++++++++++++
|
|
|
17b94a |
1 file changed, 20 insertions(+)
|
|
|
17b94a |
|
|
|
17b94a |
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
|
|
|
17b94a |
index e1d3ea0..d7dfb87 100644
|
|
|
17b94a |
--- a/extras/ganesha/scripts/ganesha-ha.sh
|
|
|
17b94a |
+++ b/extras/ganesha/scripts/ganesha-ha.sh
|
|
|
17b94a |
@@ -787,6 +787,22 @@ setup_state_volume()
|
|
|
17b94a |
}
|
|
|
17b94a |
|
|
|
17b94a |
|
|
|
17b94a |
+enable_pacemaker()
|
|
|
17b94a |
+{
|
|
|
17b94a |
+ while [[ ${1} ]]; do
|
|
|
17b94a |
+ if [ "${SERVICE_MAN}" == "/usr/bin/systemctl" ]; then
|
|
|
17b94a |
+${SECRET_PEM} root@${1} ${SERVICE_MAN} enable pacemaker"
|
|
|
17b94a |
+ ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
|
|
|
17b94a |
+${SECRET_PEM} root@${1} "${SERVICE_MAN} enable pacemaker"
|
|
|
17b94a |
+ else
|
|
|
17b94a |
+ ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
|
|
|
17b94a |
+${SECRET_PEM} root@${1} "${SERVICE_MAN} pacemaker enable"
|
|
|
17b94a |
+ fi
|
|
|
17b94a |
+ shift
|
|
|
17b94a |
+ done
|
|
|
17b94a |
+}
|
|
|
17b94a |
+
|
|
|
17b94a |
+
|
|
|
17b94a |
addnode_state_volume()
|
|
|
17b94a |
{
|
|
|
17b94a |
local newnode=${1}; shift
|
|
|
17b94a |
@@ -1011,6 +1027,8 @@ main()
|
|
|
17b94a |
|
|
|
17b94a |
if [ "X${HA_NUM_SERVERS}X" != "X1X" ]; then
|
|
|
17b94a |
|
|
|
17b94a |
+ determine_service_manager
|
|
|
17b94a |
+
|
|
|
17b94a |
setup_cluster ${HA_NAME} ${HA_NUM_SERVERS} "${HA_SERVERS}"
|
|
|
17b94a |
|
|
|
17b94a |
setup_create_resources ${HA_SERVERS}
|
|
|
17b94a |
@@ -1019,6 +1037,8 @@ main()
|
|
|
17b94a |
|
|
|
17b94a |
setup_state_volume ${HA_SERVERS}
|
|
|
17b94a |
|
|
|
17b94a |
+ enable_pacemaker ${HA_SERVERS}
|
|
|
17b94a |
+
|
|
|
17b94a |
else
|
|
|
17b94a |
|
|
|
17b94a |
logger "insufficient servers for HA, aborting"
|
|
|
17b94a |
--
|
|
|
17b94a |
1.8.3.1
|
|
|
17b94a |
|