diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:44 +0000 |
commit | 17d6a993fc17d533460c5f40f3908c708e057c18 (patch) | |
tree | 1a3bd93e0ecd74fa02f93a528fe2f87e5314c4b5 /src/pybind/mgr/devicehealth | |
parent | Releasing progress-linux version 18.2.2-0progress7.99u1. (diff) | |
download | ceph-17d6a993fc17d533460c5f40f3908c708e057c18.tar.xz ceph-17d6a993fc17d533460c5f40f3908c708e057c18.zip |
Merging upstream version 18.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/pybind/mgr/devicehealth')
-rw-r--r-- | src/pybind/mgr/devicehealth/module.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pybind/mgr/devicehealth/module.py b/src/pybind/mgr/devicehealth/module.py index 07768db75..e4356175c 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 @@ -502,8 +507,8 @@ CREATE TABLE DeviceHealthMetrics ( def put_device_metrics(self, devid: str, data: Any) -> None: SQL = """ - INSERT INTO DeviceHealthMetrics (devid, raw_smart) - VALUES (?, ?); + INSERT OR REPLACE INTO DeviceHealthMetrics (devid, raw_smart, time) + VALUES (?, ?, strftime('%s', 'now')); """ with self._db_lock, self.db: |