From d96ab579478ea3bfea6bacced4407a101cc70866 Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Mon, 3 Oct 2016 12:35:39 +0530 Subject: common-ha: Use UpdateExports dbus msg for refresh-config In nfs-ganesha 2.4, new dbs msg type "UpdateExports" support has been added. With this support, the exports can be re-configured dynamically without the need to re-export the entries. Note : This change was of part of 3.10 branching, but the commit 142ee0c overwrites this patch. Hence resubmitting this change Upstream reference : >Change-Id: Iee7330d33e91db1126974a2ff46becb3764f2e5e >BUG: 1382258 >Author: Soumya Koduri >Reviewed-on: http://review.gluster.org/15617 >Smoke: Gluster Build System >CentOS-regression: Gluster Build System >NetBSD-regression: NetBSD Build System >Reviewed-by: Kaleb KEITHLEY Change-Id: Iee7330d33e91db1126974a2ff46becb3764f2e5e BUG: 1443478 Author: Soumya Koduri Signed-off-by: Jiffin Tony Thottan Reviewed-on: https://review.gluster.org/17080 Smoke: Gluster Build System Reviewed-by: soumya k NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- extras/ganesha/scripts/ganesha-ha.sh | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'extras') diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh index 2ca6dc51632..d0e666f611c 100644 --- a/extras/ganesha/scripts/ganesha-ha.sh +++ b/extras/ganesha/scripts/ganesha-ha.sh @@ -271,19 +271,7 @@ refresh_config () output=$(ssh -oPasswordAuthentication=no \ -oStrictHostKeyChecking=no -i ${SECRET_PEM} root@${current_host} \ "dbus-send --print-reply --system --dest=org.ganesha.nfsd \ -/org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport \ -uint16:$removed_id 2>&1") - ret=$? - logger <<< "${output}" - if [ ${ret} -ne 0 ]; then - echo "Error: refresh-config failed on ${current_host}." - exit 1 - fi - sleep 1 - output=$(ssh -oPasswordAuthentication=no \ --oStrictHostKeyChecking=no -i ${SECRET_PEM} root@${current_host} \ -"dbus-send --print-reply --system --dest=org.ganesha.nfsd \ -/org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport \ +/org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.UpdateExport \ string:$HA_CONFDIR/exports/export.$VOL.conf \ string:\"EXPORT(Export_Id=$removed_id)\" 2>&1") ret=$? @@ -305,17 +293,7 @@ string:\"EXPORT(Export_Id=$removed_id)\" 2>&1") # Run the same command on the localhost, output=$(dbus-send --print-reply --system --dest=org.ganesha.nfsd \ -/org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport \ -uint16:$removed_id 2>&1) - ret=$? - logger <<< "${output}" - if [ ${ret} -ne 0 ]; then - echo "Error: refresh-config failed on localhost." - exit 1 - fi - sleep 1 - output=$(dbus-send --print-reply --system --dest=org.ganesha.nfsd \ -/org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport \ +/org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.UpdateExport \ string:$HA_CONFDIR/exports/export.$VOL.conf \ string:"EXPORT(Export_Id=$removed_id)" 2>&1) ret=$? -- cgit