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