From: Sage Weil Date: Wed, 8 Nov 2017 23:35:35 +0000 (-0600) Subject: mgr/balancer: fail a bit more gracefully if we can't create a compat weight-set X-Git-Tag: v13.0.1~244^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=476b2335fd08568d142d17848bfc58dc6e5c86d2;p=ceph.git mgr/balancer: fail a bit more gracefully if we can't create a compat weight-set Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/balancer/module.py b/src/pybind/mgr/balancer/module.py index b8cc087b9e8b..807814390707 100644 --- a/src/pybind/mgr/balancer/module.py +++ b/src/pybind/mgr/balancer/module.py @@ -656,6 +656,8 @@ class Module(MgrModule): # get current compat weight-set weights orig_ws = self.get_compat_weight_set_weights() + if orig_ws is None: + return False orig_ws = { a: b for a, b in orig_ws.iteritems() if a >= 0 } # Make sure roots don't overlap their devices. If so, we