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