summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/monitor.py
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2015-01-12 12:19:17 +0530
committerVenky Shankar <vshankar@redhat.com>2015-01-12 22:14:37 -0800
commit015282013a22dda84d1849e18659d42bb5bb48f4 (patch)
treee0485173e2f3997fd3631e50e40c48cbc676f937 /geo-replication/syncdaemon/monitor.py
parentf91d19a9ce6ec6659c84c3f907ebc3ecaceba176 (diff)
geo-rep: Handle Volume status error while getting slave nodes
gluster volume status command not returns xml output, when any error like "Transaction in Progress", we need to handle returncode along with xml error. BUG: 1151412 Signed-off-by: Aravinda VK <avishwan@redhat.com> Change-Id: Id5b7712df7cff58744b4c5a0d00870aec1d926a8 Reviewed-on: http://review.gluster.org/9432 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/monitor.py')
-rw-r--r--geo-replication/syncdaemon/monitor.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/geo-replication/syncdaemon/monitor.py b/geo-replication/syncdaemon/monitor.py
index 3e0360332bd..ee3c91f3e9f 100644
--- a/geo-replication/syncdaemon/monitor.py
+++ b/geo-replication/syncdaemon/monitor.py
@@ -35,7 +35,12 @@ def get_slave_bricks_status(host, vol):
stdout=PIPE, stderr=PIPE)
vix = po.stdout.read()
po.wait()
- po.terminate_geterr()
+ po.terminate_geterr(fail_on_err=False)
+ if po.returncode != 0:
+ logging.info("Volume status command failed, unable to get "
+ "list of up nodes of %s, returning empty list: %s" %
+ (vol, po.returncode))
+ return []
vi = XET.fromstring(vix)
if vi.find('opRet').text != '0':
logging.info("Unable to get list of up nodes of %s, "