From ce86db303d60c84603bac2f10d216e786942da1c Mon Sep 17 00:00:00 2001 From: Vijay Avuthu Date: Thu, 25 Jan 2018 21:23:13 +0530 Subject: Fixing None issue when running multiple volumes Change-Id: I7a8465a60c8e5d8f84a647ae65dbabcab2184516 Signed-off-by: Vijay Avuthu --- glustolibs-gluster/glustolibs/gluster/heal_libs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'glustolibs-gluster/glustolibs/gluster/heal_libs.py') diff --git a/glustolibs-gluster/glustolibs/gluster/heal_libs.py b/glustolibs-gluster/glustolibs/gluster/heal_libs.py index 6cbe9375d..b782caf86 100644 --- a/glustolibs-gluster/glustolibs/gluster/heal_libs.py +++ b/glustolibs-gluster/glustolibs/gluster/heal_libs.py @@ -393,8 +393,9 @@ def do_bricks_exist_in_shd_volfile(mnode, volname, brick_list): if volume_clients in each_line: parse = True elif "end-volume" in each_line: + if parse: + brick_list_server_vol.append("%s:%s" % (host, brick)) parse = False - brick_list_server_vol.append("%s:%s" % (host, brick)) elif parse: if "option remote-subvolume" in each_line: brick = each_line.split(" ")[2] @@ -406,7 +407,7 @@ def do_bricks_exist_in_shd_volfile(mnode, volname, brick_list): return False g.log.info("Brick List from volume info : %s" % brick_list) - g.log.info("Brick List from volume server " + g.log.info("Brick List from glustershd server volume " "file : %s" % brick_list_server_vol) if set(brick_list) != set(brick_list_server_vol): -- cgit