That the devicehealth module can recover after losing its libcephsqlite lock.
(self)
| 161 | return addresses[0] |
| 162 | |
| 163 | def test_maybe_reonnect(self): |
| 164 | """ |
| 165 | That the devicehealth module can recover after losing its libcephsqlite lock. |
| 166 | """ |
| 167 | |
| 168 | # make sure the database is populated and loaded by the module |
| 169 | self.mgr_cluster.mon_manager.ceph("device scrape-health-metrics") |
| 170 | |
| 171 | oldaddr = self.get_libcephsqlite() |
| 172 | self.mgr_cluster.mon_manager.ceph(f"osd blocklist add {oldaddr['addr']}/{oldaddr['nonce']}") |
| 173 | |
| 174 | def test(): |
| 175 | self.mgr_cluster.mon_manager.ceph("device scrape-health-metrics") |
| 176 | newaddr = self.get_libcephsqlite() |
| 177 | return oldaddr != newaddr |
| 178 | |
| 179 | self.wait_until_true( |
| 180 | test, |
| 181 | timeout=30 |
| 182 | ) |
nothing calls this directly
no test coverage detected