]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/insights: make 'insights prune-health-history 0' zap current state 35214/head
authorSage Weil <sage@redhat.com>
Thu, 30 Jan 2020 17:40:48 +0000 (11:40 -0600)
committerShyukri Shyukriev <shshyukriev@suse.com>
Sat, 23 May 2020 13:13:37 +0000 (16:13 +0300)
The self._health_slot value needs to be updated too if the current key
is removed.

Fixes: https://tracker.ceph.com/issues/43886
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 04f25b26c5aea5b4cf5cb94e939d6fba74228b27)

src/pybind/mgr/insights/module.py

index 21da24e11fb0bea6e161d2194d0172c7921d2b7d..e88dcb2b5c632855145e7495a162981496a37450 100644 (file)
@@ -130,6 +130,8 @@ class Module(MgrModule):
         for key in self._health_filter(lambda ts: ts <= cutoff):
             self.log.info("Removing old health slot key {}".format(key))
             self.set_store(key, None)
+        if not hours:
+            self._health_slot = health_util.HealthHistorySlot()
 
     def _health_report(self, hours):
         """