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

Abstract starting the node daemons



We're using a separate function for this, as we're going to add some
functionality to this feature.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 46cf6260
......@@ -84,6 +84,16 @@ def EnsureDaemon(name):
return True
def StartNodeDaemons():
"""Start all the daemons that should be running on all nodes.
"""
# on master or not, try to start the node dameon
EnsureDaemon(constants.NODED)
# start confd as well. On non candidates it will be in disabled mode.
EnsureDaemon(constants.CONFD)
class WatcherState(object):
"""Interface to a state file recording restart attempts.
......@@ -477,10 +487,7 @@ def main():
update_file = False
try:
# on master or not, try to start the node dameon
EnsureDaemon(constants.NODED)
# start confd as well. On non candidates it will be in disabled mode.
EnsureDaemon(constants.CONFD)
StartNodeDaemons()
notepad = WatcherState()
try:
......
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