From 0b3676631f764065b2d9ec839ac5934408c358eb Mon Sep 17 00:00:00 2001
From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com>
Date: Wed, 7 Jun 2017 08:15:48 -0400
Subject: [PATCH 494/509] common-ha: enable pacemaker at end of setup
Label: DOWNSTREAM ONLY
BUG: 1441055
Change-Id: I3ccd59b67ed364bfc5d27e88321ab5b9f8d471fd
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/108431
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
---
extras/ganesha/scripts/ganesha-ha.sh | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
index 4bea9c3..cdbc2d8 100644
--- a/extras/ganesha/scripts/ganesha-ha.sh
+++ b/extras/ganesha/scripts/ganesha-ha.sh
@@ -766,6 +766,22 @@ setup_state_volume()
}
+enable_pacemaker()
+{
+ while [[ ${1} ]]; do
+ if [ "${SERVICE_MAN}" == "/usr/bin/systemctl" ]; then
+${SECRET_PEM} root@${1} ${SERVICE_MAN} enable pacemaker"
+ ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
+${SECRET_PEM} root@${1} "${SERVICE_MAN} enable pacemaker"
+ else
+ ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
+${SECRET_PEM} root@${1} "${SERVICE_MAN} pacemaker enable"
+ fi
+ shift
+ done
+}
+
+
addnode_state_volume()
{
local newnode=${1}; shift
@@ -989,6 +1005,8 @@ main()
if [ "X${HA_NUM_SERVERS}X" != "X1X" ]; then
+ determine_service_manager
+
setup_cluster ${HA_NAME} ${HA_NUM_SERVERS} "${HA_SERVERS}"
setup_create_resources ${HA_SERVERS}
@@ -997,6 +1015,8 @@ main()
setup_state_volume ${HA_SERVERS}
+ enable_pacemaker ${HA_SERVERS}
+
else
logger "insufficient servers for HA, aborting"
--
1.8.3.1