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