]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rook: handle the case where given osd is not found
authorKefu Chai <kchai@redhat.com>
Sun, 17 Jan 2021 08:29:37 +0000 (16:29 +0800)
committerSebastian Wagner <sebastian.wagner@suse.com>
Fri, 29 Jan 2021 12:42:38 +0000 (13:42 +0100)
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 5272748e179f67c8d5464d3b38e96eb8829b6b00)

src/pybind/mgr/rook/module.py

index 101b97a7a2690a3601a53d22942281f203118f8d..c6a6293b4d5bbd29531979187f29d1479826b588 100644 (file)
@@ -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