summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorJiffin Tony Thottan <jthottan@redhat.com>2016-06-27 15:08:25 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-08-25 22:54:00 -0700
commit79e9aa5d7a24275f857d2cf23f910f63c53e9d4e (patch)
treecdb53aeabf5264198eb9cf5faa4c85899649e9fd /extras
parent0343da57b51c8b83ae59743740632ec058a0d333 (diff)
ganesha/scripts : remove 'HA_VOL_SERVER' from the code
The parameter HA_VOL_SERVER introduced intially ganesha-ha.conf to specify gluster server from which to mount the shared data volume. But after introducing new cli for the same purpose, it become unnecessary. The existence of that parameter can lead confussion to the users. This patch will remove/replace all the instance of HA_VOL_SERVER from the code Change-Id: I638c61dcd2c21ebdb279bbb141d35bb806bd3ef0 BUG: 1350371 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/14812 Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'extras')
-rw-r--r--extras/ganesha/config/ganesha-ha.conf.sample3
-rw-r--r--extras/ganesha/scripts/ganesha-ha.sh34
2 files changed, 6 insertions, 31 deletions
diff --git a/extras/ganesha/config/ganesha-ha.conf.sample b/extras/ganesha/config/ganesha-ha.conf.sample
index 2077800d255..c22892bde56 100644
--- a/extras/ganesha/config/ganesha-ha.conf.sample
+++ b/extras/ganesha/config/ganesha-ha.conf.sample
@@ -2,9 +2,6 @@
# must be unique within the subnet
HA_NAME="ganesha-ha-360"
#
-# The gluster server from which to mount the shared data volume.
-HA_VOL_SERVER="server1"
-#
# N.B. you may use short names or long names; you may not use IP addrs.
# Once you select one, stay with it as it will be mildly unpleasant to
# clean up if you switch later on. Ensure that all names - short and/or
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
index 28fc837550f..60861d4a687 100644
--- a/extras/ganesha/scripts/ganesha-ha.sh
+++ b/extras/ganesha/scripts/ganesha-ha.sh
@@ -341,35 +341,15 @@ string:"EXPORT(Path=/$VOL)" 2>&1)
copy_export_config ()
{
local new_node=${1}
- local tganesha_conf=$(mktemp)
- local tganesha_exports=$(mktemp -d)
- local short_host=$(hostname -s)
- # avoid prompting for password, even with password-less scp
- # scp $host1:$file $host2:$file prompts for the password
- # Ideally all the existing nodes in the cluster should have same
- # copy of the configuration files. Maybe for sanity check, copy
- # the state from HA_VOL_SERVER?
- if [ "${HA_VOL_SERVER}" == $(hostname) ]
- then
- cp ${GANESHA_CONF} ${tganesha_conf}
- else
- scp -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
-${SECRET_PEM} ${HA_VOL_SERVER}:${GANESHA_CONF} $short_host:${tganesha_conf}
- fi
+
+ # The add node should be executed from one of the nodes in ganesha
+ # cluster. So all the configuration file will be available in that
+ # node itself. So just copy that to new node
scp -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
-${SECRET_PEM} ${tganesha_conf} ${new_node}:${GANESHA_CONF}
- rm -f ${tganesha_conf}
+${SECRET_PEM} ${GANESHA_CONF} ${new_node}:${GANESHA_CONF}
- if [ "${HA_VOL_SERVER}" == $(hostname) ]
- then
- cp -r ${HA_CONFDIR}/exports ${tganesha_exports}
- else
- scp -r -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
-${SECRET_PEM} ${HA_VOL_SERVER}:${HA_CONFDIR}/exports/ $short_host:${tganesha_exports}
- fi
scp -r -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
-${SECRET_PEM} ${tganesha_exports}/exports ${new_node}:${HA_CONFDIR}/
- rm -rf ${tganesha_exports}
+${SECRET_PEM} ${HA_CONFDIR}/exports/ ${new_node}:${HA_CONFDIR}/
}
@@ -885,8 +865,6 @@ main()
# ignore any comment lines
cfgline=$(grep ^HA_NAME= ${ha_conf})
eval $(echo ${cfgline} | grep -F HA_NAME=)
- cfgline=$(grep ^HA_VOL_SERVER= ${ha_conf})
- eval $(echo ${cfgline} | grep -F HA_VOL_SERVER=)
cfgline=$(grep ^HA_CLUSTER_NODES= ${ha_conf})
eval $(echo ${cfgline} | grep -F HA_CLUSTER_NODES=)
fi