8 Star 0 Fork 5

src-anolis-os/glusterfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0074-common-ha-enable-pacemaker-at-end-of-setup.patch 2.04 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:34 . import glusterfs-6.0-20.el8.src.rpm
From bfbda24746bf11573b485baf534a5cf1373c6c89 Mon Sep 17 00:00:00 2001
From: "Kaleb S. KEITHLEY" <[email protected]>
Date: Wed, 7 Jun 2017 08:15:48 -0400
Subject: [PATCH 074/124] common-ha: enable pacemaker at end of setup
Label: DOWNSTREAM ONLY
Change-Id: I3ccd59b67ed364bfc5d27e88321ab5b9f8d471fd
Signed-off-by: Kaleb S. KEITHLEY <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/108431
Reviewed-by: Soumya Koduri <[email protected]>
Signed-off-by: Jiffin Tony Thottan <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/167159
Tested-by: RHGS Build Bot <[email protected]>
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <[email protected]>
---
extras/ganesha/scripts/ganesha-ha.sh | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
index e1d3ea0..d7dfb87 100644
--- a/extras/ganesha/scripts/ganesha-ha.sh
+++ b/extras/ganesha/scripts/ganesha-ha.sh
@@ -787,6 +787,22 @@ setup_state_volume()
}
+enable_pacemaker()
+{
+ while [[ ${1} ]]; do
+ if [ "${SERVICE_MAN}" == "/usr/bin/systemctl" ]; then
+${SECRET_PEM} root@${1} ${SERVICE_MAN} enable pacemaker"
+ ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
+${SECRET_PEM} root@${1} "${SERVICE_MAN} enable pacemaker"
+ else
+ ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
+${SECRET_PEM} root@${1} "${SERVICE_MAN} pacemaker enable"
+ fi
+ shift
+ done
+}
+
+
addnode_state_volume()
{
local newnode=${1}; shift
@@ -1011,6 +1027,8 @@ main()
if [ "X${HA_NUM_SERVERS}X" != "X1X" ]; then
+ determine_service_manager
+
setup_cluster ${HA_NAME} ${HA_NUM_SERVERS} "${HA_SERVERS}"
setup_create_resources ${HA_SERVERS}
@@ -1019,6 +1037,8 @@ main()
setup_state_volume ${HA_SERVERS}
+ enable_pacemaker ${HA_SERVERS}
+
else
logger "insufficient servers for HA, aborting"
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/glusterfs.git
[email protected]:src-anolis-os/glusterfs.git
src-anolis-os
glusterfs
glusterfs
a8

搜索帮助