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