diff options
author | Soumya Koduri <skoduri@redhat.com> | 2016-10-03 12:35:39 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2016-10-19 06:55:23 -0700 |
commit | 20d2b36f3acc2f27527b7913d2ad939848395aeb (patch) | |
tree | 293da4746371001d36782a77b6dd4ad395069362 | |
parent | fd045aefbd2ea8315f76e6659753ebd1d7b6d801 (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.
Change-Id: Iee7330d33e91db1126974a2ff46becb3764f2e5e
BUG: 1382258
Signed-off-by: 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>
-rw-r--r-- | extras/ganesha/scripts/ganesha-ha.sh | 29 | ||||
-rw-r--r-- | glusterfs.spec.in | 3 |
2 files changed, 4 insertions, 28 deletions
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh index 5162eb5e4da..b5172dc032b 100644 --- a/extras/ganesha/scripts/ganesha-ha.sh +++ b/extras/ganesha/scripts/ganesha-ha.sh @@ -241,9 +241,6 @@ refresh_config () local HA_CONFDIR=${2} local short_host=$(hostname -s) - removed_id=`cat $HA_CONFDIR/exports/export.$VOL.conf |\ -grep Export_Id | awk -F"[=,;]" '{print$2}' | tr -d '[[:space:]]'` - if [ -e ${SECRET_PEM} ]; then while [[ ${3} ]]; do current_host=`echo ${3} | cut -d "." -f 1` @@ -251,19 +248,7 @@ grep Export_Id | awk -F"[=,;]" '{print$2}' | tr -d '[[:space:]]'` 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(Path=/$VOL)\" 2>&1") ret=$? @@ -285,17 +270,7 @@ string:\"EXPORT(Path=/$VOL)\" 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(Path=/$VOL)" 2>&1) ret=$? diff --git a/glusterfs.spec.in b/glusterfs.spec.in index a5b94686b86..e70ec0cdfb3 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -371,7 +371,8 @@ Summary: NFS-Ganesha configuration Group: Applications/File Requires: %{name}-server%{?_isa} = %{version}-%{release} -Requires: nfs-ganesha-gluster, pcs, dbus +Requires: nfs-ganesha-gluster >= 2.4.0 +Requires: pcs, dbus %if ( 0%{?rhel} && 0%{?rhel} == 6 ) Requires: cman, pacemaker, corosync %endif |