Commit 5b27346a authored by René Nussbaumer's avatar René Nussbaumer

If we had any errors in setup in one of the hosts, exit with non-zero

Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent bd2475e2
......@@ -304,6 +304,8 @@ def main():
SetupLogging(options)
errs = 0
all_keys = LoadPrivateKeys(options)
passwd = None
......@@ -345,14 +347,18 @@ def main():
SetupSSH(transport)
SetupNodeDaemon(transport)
except errors.GenericError, err:
logging.error("While doing setup on host %s an error occured: %s",
logging.error("While doing setup on host %s an error occurred: %s",
host, err)
errs += 1
finally:
transport.close()
# this is needed for compatibility with older Paramiko or Python
# versions
transport.join()
if errs > 0:
sys.exit(1)
if __name__ == "__main__":
main()
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