Commit d512e84b authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Improve “gnt-cluster renew-crypto”



- Report exception text immediately instead of just logging it
- Remove leftover assertion from when it still used “gnt-cluster
  modify”
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 8fe9239e
......@@ -1665,8 +1665,10 @@ class _RunWhileClusterStoppedHelper:
# All daemons are shut down now
try:
return fn(self, *args)
except Exception:
except Exception, err:
_, errmsg = FormatError(err)
logging.exception("Caught exception")
self.feedback_fn(errmsg)
raise
finally:
# Start cluster again, master node last
......
......@@ -510,9 +510,6 @@ def _RenewCrypto(new_cluster_cert, new_rapi_cert, rapi_cert_filename,
@param force: Whether to ask user for confirmation
"""
assert (new_cluster_cert or new_rapi_cert or rapi_cert_filename or
new_confd_hmac_key)
if new_rapi_cert and rapi_cert_filename:
ToStderr("Only one of the --new-rapi-certficate and --rapi-certificate"
" options can be specified at the same time.")
......
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