From 74899c7705fe46a752f3b8bb0490b32261af9f60 Mon Sep 17 00:00:00 2001 From: Joshua Schmid Date: Tue, 16 Jun 2020 11:53:25 +0200 Subject: [PATCH] mgr/cephadm: exclude osds without osdspec_affinity Signed-off-by: Joshua Schmid (cherry picked from commit 343cf0386264e0c6c4851614b7251c18792e2d8b) --- src/pybind/mgr/cephadm/module.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 4b247907ac83c..b89c2408bb6f6 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -1279,6 +1279,9 @@ you may want to run: OSDs do not know the affinity to their spec out of the box. """ n = f"osd.{dd.osdspec_affinity}" + if not dd.osdspec_affinity: + # If there is no osdspec_affinity, the spec should suffice for displaying + continue if n in self.spec_store.specs: spec = self.spec_store.specs[n] else: -- 2.39.5