Commit 8204efcf authored by Petr Pudlak's avatar Petr Pudlak
Browse files

Stop MonD when removing a node from a cluster



Currently if we remove a node from a cluster, or destroy a cluster, the
daemon is still running.

The non-master daemons are stopped in 'LeaveCluster', so add stopping
MonD there as well.
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent ee2b2eda
...@@ -564,10 +564,8 @@ def LeaveCluster(modify_ssh_setup): ...@@ -564,10 +564,8 @@ def LeaveCluster(modify_ssh_setup):
except: # pylint: disable=W0702 except: # pylint: disable=W0702
logging.exception("Error while removing cluster secrets") logging.exception("Error while removing cluster secrets")
result = utils.RunCmd([pathutils.DAEMON_UTIL, "stop", constants.CONFD]) utils.StopDaemon(constants.CONFD)
if result.failed: utils.StopDaemon(constants.MOND)
logging.error("Command %s failed with exitcode %s and error %s",
result.cmd, result.exit_code, result.output)
# Raise a custom exception (handled in ganeti-noded) # Raise a custom exception (handled in ganeti-noded)
raise errors.QuitGanetiException(True, "Shutdown scheduled") 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