summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2016-10-03 12:35:39 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2017-04-24 10:33:28 +0000
commitd96ab579478ea3bfea6bacced4407a101cc70866 (patch)
tree9092e75de2828a207c174410c0aa425209c7d883 /extras
parente2cbfcbf154cc7b0c95eaaf079eab7291ffdb580 (diff)
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 <skoduri@redhat.com> >Reviewed-on: http://review.gluster.org/15617 >Smoke: Gluster Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Change-Id: Iee7330d33e91db1126974a2ff46becb3764f2e5e BUG: 1443478 Author: Soumya Koduri <skoduri@redhat.com> Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: https://review.gluster.org/17080 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'extras')
-rw-r--r--extras/ganesha/scripts/ganesha-ha.sh26
1 files changed, 2 insertions, 24 deletions
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=$?