LGTM Thanks,
Guido On Tue, May 14, 2013 at 5:42 PM, Michele Tartara <[email protected]>wrote: > 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: Michele Tartara <[email protected]> > --- > lib/tools/node_daemon_setup.py | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/lib/tools/node_daemon_setup.py > b/lib/tools/node_daemon_setup.py > index 28bcba0..9048ace 100644 > --- a/lib/tools/node_daemon_setup.py > +++ b/lib/tools/node_daemon_setup.py > @@ -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") > -- > 1.8.2.1 > > -- Guido Trotter Ganeti Engineering Google Germany GmbH Dienerstr. 12, 80331, München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Katherine Stephens Steuernummer: 48/725/00206 Umsatzsteueridentifikationsnummer: DE813741370
