summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorMeghana M <mmadhusu@redhat.com>2015-07-10 04:23:31 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-07-14 17:56:34 -0700
commit7b4c522fe9cfa40f5ef5549d54eb6f3775eb2ea5 (patch)
tree4610c5f8cc3f60b4a61361ca9a7b9314b77d9a62 /extras
parent1059bb42a8ef513484c12a33cef432e2156ae2dd (diff)
NFS-Ganesha : Add-node does not copy "exports" directory correctly
Add-node logic has to copy the "exports" directory into the new node in the same path. There was an error in copying to the correct path. Fixing it. This is a backport of the patch merged upstream, http://review.gluster.org/#/c/11618/ Change-Id: I76d8679966372d6fcee2dcf38bc20c9b5c522132 BUG: 1242192 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11635 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'extras')
-rw-r--r--extras/ganesha/scripts/ganesha-ha.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
index 9e03eb63b86..9c82c091304 100644
--- a/extras/ganesha/scripts/ganesha-ha.sh
+++ b/extras/ganesha/scripts/ganesha-ha.sh
@@ -243,7 +243,7 @@ grep Export_Id | cut -d " " -f8`
if [ -e ${SECRET_PEM} ]; then
while [[ ${3} ]]; do
- current_host=`echo ${3} | cut -d "." -f 1`
+ current_host=`echo ${3} | cut -d "." -f 1`
if [ ${short_host} != ${current_host} ]; then
scp -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
${SECRET_PEM} ${HA_CONFDIR}/exports/export.$VOL.conf \
@@ -282,21 +282,21 @@ string:"EXPORT(Path=/$VOL)"
copy_export_config ()
{
local new_node=${1}
- local tganesha_conf=$(mktemp -u)
+ 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
scp -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
-${SECRET_PEM} ${HA_VOL_SERVER}:${GANESHA_CONF} ${tganesha_conf}
+${SECRET_PEM} ${HA_VOL_SERVER}:${GANESHA_CONF} $short_host:${tganesha_conf}
scp -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
${SECRET_PEM} ${tganesha_conf} ${new_node}:${GANESHA_CONF}
rm -f ${tganesha_conf}
scp -r -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
-${SECRET_PEM} ${HA_VOL_SERVER}:${HA_CONFDIR}/exports/ ${tganesha_exports}
+${SECRET_PEM} ${HA_VOL_SERVER}:${HA_CONFDIR}/exports/ $short_host:${tganesha_exports}
scp -r -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
-${SECRET_PEM} ${tganesha_exports} ${new_node}:${HA_CONFDIR}/
+${SECRET_PEM} ${tganesha_exports}/exports ${new_node}:${HA_CONFDIR}/
rm -rf ${tganesha_exports}
}