summaryrefslogtreecommitdiffstats
path: root/extras/ganesha/scripts/ganesha-ha.sh
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2015-09-14 12:32:09 -0400
committerKaleb KEITHLEY <kkeithle@redhat.com>2016-03-14 21:30:14 -0700
commit932ef7d760ee7593d337026b2126037105ffe410 (patch)
treeeb415d9bedff2c5eafeb123eb7ea52aebeea894f /extras/ganesha/scripts/ganesha-ha.sh
parentbcb3f9ba2b879257192c269ded6d16d29479023a (diff)
common-ha: refresh-config output includes dbus "method return" msg
filter out extraneous text from dbus-send BUG: 1262881 Change-Id: I2fec5c0cc8d1db0a12a42ca2d727a4320fd57b30 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/12174 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/13722 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>
Diffstat (limited to 'extras/ganesha/scripts/ganesha-ha.sh')
-rw-r--r--extras/ganesha/scripts/ganesha-ha.sh34
1 files changed, 18 insertions, 16 deletions
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
index 9b634177065..533056b3f24 100644
--- a/extras/ganesha/scripts/ganesha-ha.sh
+++ b/extras/ganesha/scripts/ganesha-ha.sh
@@ -249,10 +249,11 @@ grep Export_Id | cut -d " " -f8`
scp -q -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
${SECRET_PEM} ${HA_CONFDIR}/exports/export.$VOL.conf \
${current_host}:${HA_CONFDIR}/exports/
- 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")
+ 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 | grep -v \"^method return\"")
ret=$?
logger <<< "${output}"
if [ ${ret} -ne 0 ]; then
@@ -260,11 +261,12 @@ org.ganesha.nfsd.exportmgr.RemoveExport uint16:$removed_id 2>&1")
exit 1
fi
sleep 1
- output=$(ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \
-${SECRET_PEM} root@${current_host} "dbus-send --system \
---dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr \
-org.ganesha.nfsd.exportmgr.AddExport string:$HA_CONFDIR/exports/export.$VOL.conf \
-string:\"EXPORT(Path=/$VOL)\" 2>&1")
+ output=$(ssh -oPasswordAuthentication=no \
+-oStrictHostKeyChecking=no -i ${SECRET_PEM} root@${current_host} \
+"dbus-send --system --dest=org.ganesha.nfsd \
+/org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport \
+string:$HA_CONFDIR/exports/export.$VOL.conf \
+string:\"EXPORT(Path=/$VOL)\" 2>&1 | grep -v \"^method return\"")
ret=$?
logger <<< "${output}"
if [ ${ret} -ne 0 ]; then
@@ -282,9 +284,9 @@ string:\"EXPORT(Path=/$VOL)\" 2>&1")
fi
#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)
+ output=$(dbus-send --print-reply --system --dest=org.ganesha.nfsd \
+/org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport \
+uint16:$removed_id 2>&1 | grep -v "^method return")
ret=$?
logger <<< "${output}"
if [ ${ret} -ne 0 ]; then
@@ -292,10 +294,10 @@ org.ganesha.nfsd.exportmgr.RemoveExport uint16:$removed_id 2>&1)
exit 1
fi
sleep 1
- output=$(dbus-send --system \
---dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr \
-org.ganesha.nfsd.exportmgr.AddExport string:$HA_CONFDIR/exports/export.$VOL.conf \
-string:"EXPORT(Path=/$VOL)" 2>&1)
+ output=$(dbus-send --system --dest=org.ganesha.nfsd \
+/org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport \
+string:$HA_CONFDIR/exports/export.$VOL.conf \
+string:"EXPORT(Path=/$VOL)" 2>&1 | grep -v "^method return")
ret=$?
logger <<< "${output}"
if [ ${ret} -ne 0 ] ; then