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

Method wait_run_admin_socket

qa/tasks/ceph_manager.py:2068–2093  ·  view source on GitHub ↗

If osd_admin_socket call succeeds, return. Otherwise wait five seconds and try again.

(self, service_type,
                              service_id, args=['version'], timeout=75, stdout=None)

Source from the content-addressed store, hash-verified

2066 '0')
2067
2068 def wait_run_admin_socket(self, service_type,
2069 service_id, args=['version'], timeout=75, stdout=None):
2070 """
2071 If osd_admin_socket call succeeds, return. Otherwise wait
2072 five seconds and try again.
2073 """
2074 if stdout is None:
2075 stdout = StringIO()
2076 tries = 0
2077 while True:
2078 proc = self.admin_socket(service_type, service_id,
2079 args, check_status=False, stdout=stdout)
2080 if proc.exitstatus == 0:
2081 return proc
2082 else:
2083 tries += 1
2084 if (tries * 5) > timeout:
2085 raise Exception('timed out waiting for admin_socket '
2086 'to appear after {type}.{id} restart'.
2087 format(type=service_type,
2088 id=service_id))
2089 self.log("waiting on admin_socket for {type}-{id}, "
2090 "{command}".format(type=service_type,
2091 id=service_id,
2092 command=args))
2093 time.sleep(5)
2094
2095 def get_pool_dump(self, pool):
2096 """

Callers 6

get_configMethod · 0.95
set_configMethod · 0.95
revive_osdMethod · 0.95
taskFunction · 0.80
taskFunction · 0.80
taskFunction · 0.80

Calls 4

admin_socketMethod · 0.95
formatMethod · 0.45
logMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected