Commit ed008420 authored by Guido Trotter's avatar Guido Trotter
Browse files

Remove secrets and kill confd on cluster leave


Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 392ca296
......@@ -375,6 +375,18 @@ def LeaveCluster():
except errors.OpExecError:
logging.exception("Error while processing ssh files")
try:
utils.RemoveFile(constants.HMAC_CLUSTER_KEY)
utils.RemoveFile(constants.RAPI_CERT_FILE)
utils.RemoveFile(constants.SSL_CERT_FILE)
except:
logging.exception("Error while removing cluster secrets")
confd_pid = utils.ReadPidFile(utils.DaemonPidFileName(constants.CONFD))
if confd_pid:
utils.KillProcess(confd_pid, timeout=2)
# Raise a custom exception (handled in ganeti-noded)
raise errors.QuitGanetiException(True, 'Shutdown scheduled')
......
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