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>
This commit is contained in:
Aravinda VK 2015-01-12 12:19:17 +05:30 committed by Venky Shankar
parent f91d19a9ce
commit 015282013a

View File

@ -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, "