Traceback (most recent call last):
File "test_tmp/tmp.ykMmPiFqIT/cephadm", line 4578, in <module>
r = args.func()
File "test_tmp/tmp.ykMmPiFqIT/cephadm", line 1121, in _default_image
return func()
File "test_tmp/tmp.ykMmPiFqIT/cephadm", line 2489, in command_bootstrap
is_available('mgr', is_mgr_available)
File "test_tmp/tmp.ykMmPiFqIT/cephadm", line 895, in is_available
if func():
File "test_tmp/tmp.ykMmPiFqIT/cephadm", line 2486, in is_mgr_available
out = cli(['status', '-f', 'json-pretty'], timeout=timeout)
File "test_tmp/tmp.ykMmPiFqIT/cephadm", line 2403, in cli
return CephContainer(
File "test_tmp/tmp.ykMmPiFqIT/cephadm", line 2140, in run
out, _, _ = call_throws(
File "test_tmp/tmp.ykMmPiFqIT/cephadm", line 838, in call_throws
raise RuntimeError('Failed command: %s' % ' '.join(command))
Signed-off-by: Michael Fritch <mfritch@suse.com>
num = 1
while True:
if func():
+ logger.info('%s is available'
+ % (what))
break
elif num > retry:
raise Error('%s not available after %s tries'
def is_mgr_available():
# type: () -> bool
timeout=args.timeout if args.timeout else 30 # seconds
- out = cli(['status', '-f', 'json-pretty'], timeout=timeout)
- j = json.loads(out)
- return j.get('mgrmap', {}).get('available', False)
+ try:
+ out = cli(['status', '-f', 'json-pretty'], timeout=timeout)
+ j = json.loads(out)
+ return j.get('mgrmap', {}).get('available', False)
+ except Exception as e:
+ logger.debug('status failed: %s' % e)
+ return False
is_available('mgr', is_mgr_available)
# wait for mgr to restart (after enabling a module)