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

Method wait_for_active

qa/tasks/ceph_manager.py:3049–3068  ·  view source on GitHub ↗

Check peering. When this exists, we are definitely active

(self, timeout=None)

Source from the content-addressed store, hash-verified

3047 self.log("recovered!")
3048
3049 def wait_for_active(self, timeout=None):
3050 """
3051 Check peering. When this exists, we are definitely active
3052 """
3053 self.log("waiting for peering to complete")
3054 start = time.time()
3055 num_active = self.get_num_active()
3056 while not self.is_active():
3057 if timeout is not None:
3058 if time.time() - start >= timeout:
3059 self.log('dumping pgs not active')
3060 self.dump_pgs_not_active()
3061 assert time.time() - start < timeout, \
3062 'wait_for_active: failed before timeout expired'
3063 cur_active = self.get_num_active()
3064 if cur_active != num_active:
3065 start = time.time()
3066 num_active = cur_active
3067 time.sleep(3)
3068 self.log("active!")
3069
3070 def wait_for_active_or_down(self, timeout=None):
3071 """

Callers 3

test_incomplete_pgsFunction · 0.95
taskFunction · 0.95
taskFunction · 0.95

Calls 5

get_num_activeMethod · 0.95
is_activeMethod · 0.95
dump_pgs_not_activeMethod · 0.95
logMethod · 0.45
sleepMethod · 0.45

Tested by 1

test_incomplete_pgsFunction · 0.76