MCPcopy Create free account
hub / github.com/ceph/ceph / test_maybe_reonnect

Method test_maybe_reonnect

qa/tasks/mgr/test_failover.py:163–182  ·  view source on GitHub ↗

That the devicehealth module can recover after losing its libcephsqlite lock.

(self)

Source from the content-addressed store, hash-verified

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 )

Callers

nothing calls this directly

Calls 3

get_libcephsqliteMethod · 0.95
cephMethod · 0.80
wait_until_trueMethod · 0.45

Tested by

no test coverage detected