From 0db82a313b0d37cbc419dc408b2815eb01d7421b Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Thu, 21 Dec 2023 08:48:33 -0500 Subject: [PATCH] pybind/mgr/devicehealth: skip legacy objects that cannot be loaded Log looks like after test: 2023-12-21T16:09:28.804+0000 7fbe7fd86700 0 [devicehealth DEBUG root] loading object ABC_DEADB33F_FA 2023-12-21T16:09:28.805+0000 7fbe7fd86700 0 [devicehealth DEBUG root] object rados.Object(ioctx=,key=ABC_DEADB33F_FA,nspace=--default--,locator=None) does not exist because it is deleted in HEAD 2023-12-21T16:09:28.805+0000 7fbe7fd86700 0 [devicehealth DEBUG root] finished reading legacy pool, complete = True Credit to Greg Farnum for postulating the cause. Fixes: https://tracker.ceph.com/issues/63882 Signed-off-by: Patrick Donnelly (cherry picked from commit 5e6fc0bf5f52732966d5cf2987e679abee8a384d) --- src/pybind/mgr/devicehealth/module.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pybind/mgr/devicehealth/module.py b/src/pybind/mgr/devicehealth/module.py index 86ea1d280720c..e4356175c6a42 100644 --- a/src/pybind/mgr/devicehealth/module.py +++ b/src/pybind/mgr/devicehealth/module.py @@ -327,6 +327,11 @@ CREATE TABLE DeviceHealthMetrics ( count += 1 except json.decoder.JSONDecodeError: pass + except rados.ObjectNotFound: + # https://tracker.ceph.com/issues/63882 + # Sometimes an object appears in the pool listing but cannot be interacted with? + self.log.debug(f"object {obj} does not exist because it is deleted in HEAD") + pass if count >= 10: break done = count < 10 -- 2.39.5