From: Sage Weil Date: Fri, 13 Apr 2018 22:52:24 +0000 (-0500) Subject: mgr/balancer: identify roots that osds overlap in X-Git-Tag: v13.1.0~259^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=05a94472463e3b39f588022810fcc89eb47acfab;p=ceph.git mgr/balancer: identify roots that osds overlap in This error message isn't very informative; tell the user which osds appear in mulitple roots, and which roots those are! Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/balancer/module.py b/src/pybind/mgr/balancer/module.py index 807c521f621..289fc127d83 100644 --- a/src/pybind/mgr/balancer/module.py +++ b/src/pybind/mgr/balancer/module.py @@ -747,11 +747,13 @@ class Module(MgrModule): for root, wm in pe.target_by_root.iteritems(): for osd in wm.iterkeys(): if osd in visited: - overlap[osd] = 1 - visited[osd] = 1 + if osd not in overlap: + overlap[osd] = [ visited[osd] ] + overlap[osd].append(root) + visited[osd] = root if len(overlap) > 0: detail = 'Some osds belong to multiple subtrees: %s' % \ - overlap.keys() + overlap self.log.error(detail) return -errno.EOPNOTSUPP, detail