From 198acf49306459e5ef2ded29b4f64f97ff2e95db Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 17 Jan 2021 16:29:37 +0800 Subject: [PATCH] mgr/rook: handle the case where given osd is not found Signed-off-by: Kefu Chai (cherry picked from commit 5272748e179f67c8d5464d3b38e96eb8829b6b00) --- src/pybind/mgr/rook/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/rook/module.py b/src/pybind/mgr/rook/module.py index 101b97a7a2690..c6a6293b4d5bb 100644 --- a/src/pybind/mgr/rook/module.py +++ b/src/pybind/mgr/rook/module.py @@ -570,7 +570,7 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator): found.append(osd_id) else: self.log.info("ignoring osd {0} {1}".format( - osd_id, metadata['devices'] + osd_id, metadata['devices'] if metadata else 'DNE' )) return found is not None -- 2.39.5