return t.retval
+def send_command_retry(*args, **kwargs):
+ while True:
+ try:
+ return send_command(*args, **kwargs)
+ except Exception as e:
+ if ('get_command_descriptions' in str(e) and
+ 'object in state configuring' in str(e)):
+ continue
+ else:
+ raise
+
def send_command(cluster, target=('mon', ''), cmd=None, inbuf=b'', timeout=0,
verbose=False):
"""
# use the target we were originally given
pass
- ret, outbuf, outs = send_command(cluster, target, [json.dumps(cmddict)],
- inbuf, timeout, verbose)
+ ret, outbuf, outs = send_command_retry(cluster,
+ target, [json.dumps(cmddict)],
+ inbuf, timeout, verbose)
except Exception as e:
if not isinstance(e, ArgumentError):