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