summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitalii Koriakov <vkoriako@redhat.com>2018-12-19 13:01:07 +0200
committerVitalii Koriakov <vkoriako@redhat.com>2018-12-19 13:01:07 +0200
commit34055520c99ae059c838b1bd75b3a96306f893f4 (patch)
treebbe49e8b95f0818eb4813792cdb5246a8519e4cc
parentec70a07bf0d5a612024b12e490c075e9f80bf7fb (diff)
Fixed: servers with no bricks are not icluded in servers_unused_bricks_dict
Change-Id: I953975d66c333c141b03b4eaa7118a93859be878 Signed-off-by: Vitalii Koriakov <vkoriako@redhat.com>
-rwxr-xr-xglustolibs-gluster/glustolibs/gluster/lib_utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/lib_utils.py b/glustolibs-gluster/glustolibs/gluster/lib_utils.py
index 95be23e..29172b2 100755
--- a/glustolibs-gluster/glustolibs/gluster/lib_utils.py
+++ b/glustolibs-gluster/glustolibs/gluster/lib_utils.py
@@ -397,7 +397,8 @@ def get_servers_unused_bricks_dict(mnode, servers, servers_info):
for key, value in list(dict1.items()):
if key in dict2:
unused_bricks = list(set(value) - set(dict2[key]))
- servers_unused_bricks_dict[key] = unused_bricks
+ if unused_bricks:
+ servers_unused_bricks_dict[key] = unused_bricks
else:
servers_unused_bricks_dict[key] = value