diff options
author | Jiffin Tony Thottan <jthottan@redhat.com> | 2016-05-05 14:52:32 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2016-05-05 11:13:45 -0700 |
commit | 5440bad91026f27399df51856176aef85c1fcf4d (patch) | |
tree | 1126d0ef210c879fc922c5bae7d16a672dec8669 /extras/ganesha/scripts/ganesha-ha.sh | |
parent | 3f07e9324d8fa62a6231f387270d8e7559ac71e0 (diff) |
NFS-Ganesha : Parse the Export_Id correctly for unexporting volume
Currently export id parsed using "cut -d ' ' -f8" which might endup
in giving wrong value. In case of multiple space chracter, output
may differ. In this all those instance will replaced by awk call
Change-Id: I60dea8ce116900da3c1fc9badf898e51183a2ca1
BUG: 1333319
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/14225
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'extras/ganesha/scripts/ganesha-ha.sh')
-rw-r--r-- | extras/ganesha/scripts/ganesha-ha.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh index 7f1ea4c2da5..a712b270033 100644 --- a/extras/ganesha/scripts/ganesha-ha.sh +++ b/extras/ganesha/scripts/ganesha-ha.sh @@ -259,7 +259,7 @@ ${tganesha_vol_conf} removed_id=$(ssh -oPasswordAuthentication=no \ -oStrictHostKeyChecking=no -i ${SECRET_PEM} root@${current_host} \ "cat $HA_CONFDIR/exports/export.$VOL.conf |\ -grep Export_Id | cut -d ' ' -f8") +grep Export_Id | awk -F"[=,;]" '{print$2}' | tr -d '[[:space:]]'") output=$(ssh -oPasswordAuthentication=no \ -oStrictHostKeyChecking=no -i ${SECRET_PEM} root@${current_host} \ @@ -306,7 +306,7 @@ string:\"EXPORT(Path=/$VOL)\" 2>&1") # Run the same command on the localhost, removed_id=`cat $HA_CONFDIR/exports/export.$VOL.conf |\ -grep Export_Id | cut -d " " -f8` +grep Export_Id | awk -F"[=,;]" '{print$2}' | tr -d '[[:space:]]'` output=$(dbus-send --print-reply --system --dest=org.ganesha.nfsd \ /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport \ uint16:$removed_id 2>&1) |