Commit 66234263 authored by Michele Tartara's avatar Michele Tartara
Browse files

Start the monitoring and node daemons together



Add the monitoring daemon to the command starting the node daemon, given that
they both have to be started on all nodes.

Note that daemon-util only supports starting one daemon at the time, so the
actual command has to be composed as a sequence of two different daemon-util
invocations.

Also, the monitoring daemon invocation is conditional, depending on whether it
was enabled at configure time.
Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 5bb9ecc0
......@@ -216,12 +216,17 @@ def Main():
not opts.dry_run):
logging.info("Restarting node daemon ...")
cmd = ("%s stop-all; %s start %s" %
(pathutils.DAEMON_UTIL, pathutils.DAEMON_UTIL, constants.NODED))
stop_cmd = "%s stop-all" % pathutils.DAEMON_UTIL
noded_cmd = "%s start %s" % (pathutils.DAEMON_UTIL, constants.NODED)
mond_cmd = ""
if constants.ENABLE_MOND:
mond_cmd = "%s start %s" % (pathutils.DAEMON_UTIL, constants.MOND)
cmd = "; ".join([stop_cmd, noded_cmd, mond_cmd])
result = utils.RunCmd(cmd, interactive=True)
if result.failed:
raise SetupError("Could not start the node daemon, command '%s'"
raise SetupError("Could not start the node daemons, command '%s'"
" failed: %s" % (result.cmd, result.fail_reason))
logging.info("Node daemon successfully configured")
......
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