Commit e7296f14 authored by Jose A. Lopes's avatar Jose A. Lopes
Browse files

Reuse existing helper function to stop a daemon

... to reduce code duplication.
Signed-off-by: default avatarJose A. Lopes <>
Reviewed-by: default avatarHrvoje Ribicic <>
parent 220c3439
......@@ -556,10 +556,7 @@ def LeaveCluster(modify_ssh_setup):
except: # pylint: disable=W0702
logging.exception("Error while removing cluster secrets")
result = utils.RunCmd([pathutils.DAEMON_UTIL, "stop", constants.CONFD])
if result.failed:
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 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