From 2f70f47979d204d5ee29811f5f5fa61d0a52c3b1 Mon Sep 17 00:00:00 2001 From: Jiffin Tony Thottan Date: Fri, 28 Oct 2016 17:37:39 +0530 Subject: ganesha/scripts : use export id for dbus signals Currently for add export and update export parameter passed for executing those signal is "PATH". This is based on assumption that volume name and PATH will always be same. But it is wrong for subdir exports. The only reliable parameter in export configuration file is "Export_Id". Change-Id: Ic63ff44ac7736e14502034b74beaae27292eddf9 BUG: 1389746 Signed-off-by: Jiffin Tony Thottan Reviewed-on: http://review.gluster.org/15751 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: soumya k Reviewed-by: Kaleb KEITHLEY --- extras/ganesha/scripts/ganesha-ha.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'extras/ganesha/scripts') diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh index 55a019e6b33..30b7e2f3c14 100644 --- a/extras/ganesha/scripts/ganesha-ha.sh +++ b/extras/ganesha/scripts/ganesha-ha.sh @@ -241,6 +241,10 @@ refresh_config () local HA_CONFDIR=${2} local short_host=$(hostname -s) + local export_id=$(grep ^[[:space:]]*Export_Id $HA_CONFDIR/exports/export.$VOL.conf |\ + awk -F"[=,;]" '{print $2}' | tr -d '[[:space:]]') + + if [ -e ${SECRET_PEM} ]; then while [[ ${3} ]]; do current_host=`echo ${3} | cut -d "." -f 1` @@ -250,7 +254,7 @@ refresh_config () "dbus-send --print-reply --system --dest=org.ganesha.nfsd \ /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.UpdateExport \ string:$HA_CONFDIR/exports/export.$VOL.conf \ -string:\"EXPORT(Path=/$VOL)\" 2>&1") +string:\"EXPORT(Export_Id=$export_id)\" 2>&1") ret=$? logger <<< "${output}" if [ ${ret} -ne 0 ]; then @@ -272,7 +276,7 @@ string:\"EXPORT(Path=/$VOL)\" 2>&1") output=$(dbus-send --print-reply --system --dest=org.ganesha.nfsd \ /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.UpdateExport \ string:$HA_CONFDIR/exports/export.$VOL.conf \ -string:"EXPORT(Path=/$VOL)" 2>&1) +string:"EXPORT(Export_Id=$export_id)" 2>&1) ret=$? logger <<< "${output}" if [ ${ret} -ne 0 ] ; then -- cgit