From 24eee0352397cfa8b51d467eb1bd46f710124012 Mon Sep 17 00:00:00 2001 From: ShwethaHP Date: Tue, 23 Jan 2018 12:28:50 +0530 Subject: Check if volume type is 'distribute' before checking if self-heal-daemons are online Change-Id: I25424dd182c347a0570713ada8d2de611840fef3 Signed-off-by: ShwethaHP --- glustolibs-gluster/glustolibs/gluster/heal_libs.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/glustolibs-gluster/glustolibs/gluster/heal_libs.py b/glustolibs-gluster/glustolibs/gluster/heal_libs.py index 3da020380..1de540836 100644 --- a/glustolibs-gluster/glustolibs/gluster/heal_libs.py +++ b/glustolibs-gluster/glustolibs/gluster/heal_libs.py @@ -96,6 +96,13 @@ def are_all_self_heal_daemons_are_online(mnode, volname): False otherwise. NoneType: None if unable to get the volume status """ + from glustolibs.gluster.volume_libs import is_distribute_volume + if is_distribute_volume(mnode, volname): + g.log.info("Volume %s is a distribute volume. " + "Hence not checking for self-heal daemons " + "to be online", volname) + return True + service = 'shd' failure_msg = ("Verifying all self-heal-daemons are online failed for " "volume %s" % volname) @@ -286,6 +293,13 @@ def wait_for_self_heal_daemons_to_be_online(mnode, volname, timeout=300): True if all self-heal-daemons are online within timeout, False otherwise """ + from glustolibs.gluster.volume_libs import is_distribute_volume + if is_distribute_volume(mnode, volname): + g.log.info("Volume %s is a distribute volume. " + "Hence not waiting for self-heal daemons " + "to be online", volname) + return True + counter = 0 flag = 0 while counter < timeout: -- cgit