Commit 503cc75f authored by Guido Trotter's avatar Guido Trotter
Browse files

Try 3 times before giving up on per-node commands



When contacting lots of nodes some may fail. Give it a couple more
chances before giving up on them.

Possible future TODO: continue, but just mark them as offline.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 07ff0a78
......@@ -207,7 +207,7 @@ class Merger(object):
for node in data.nodes:
result = self._RunCmd(node, ("cat >> %s << '!EOF.'\n%s!EOF.\n" %
(auth_keys, pub_key)),
private_key=data.key_path)
private_key=data.key_path, max_attempts=3)
if result.failed:
raise errors.RemoteError("Unable to add our public key to %s in %s."
......@@ -267,7 +267,7 @@ class Merger(object):
cmd = "%s stop-all" % constants.DAEMON_UTIL
for data in self.merger_data:
for node in data.nodes:
result = self._RunCmd(node, cmd)
result = self._RunCmd(node, cmd, max_attempts=3)
if result.failed:
raise errors.RemoteError("Unable to stop daemons on %s."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment