Commit aa224134 authored by Iustin Pop's avatar Iustin Pop
Browse files

Adapt watcher for ENABLE_CONFD



If confd is disabled, do not automatically restart it. Furthermore, we
can't run maintenance actions if it is disabled so log a warning.

Note that I haven't completely disabled the NodeMaintenance class with
ENABLE_CONFD = False because I think they are at two different levels
(e.g. we might have other maintenance actions done even with confd
disabled).
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent db3780f9
......@@ -92,7 +92,8 @@ def StartNodeDaemons():
# on master or not, try to start the node daemon
utils.EnsureDaemon(constants.NODED)
# start confd as well. On non candidates it will be in disabled mode.
utils.EnsureDaemon(constants.CONFD)
if constants.ENABLE_CONFD:
utils.EnsureDaemon(constants.CONFD)
def RunWatcherHooks():
......
......@@ -130,6 +130,10 @@ class NodeMaintenance(object):
"""Check node status versus cluster desired state.
"""
if not constants.ENABLE_CONFD:
logging.warning("Confd use not enabled, cannot do maintenance")
return
my_name = netutils.Hostname.GetSysName()
req = \
confd.client.ConfdClientRequest(type=constants.CONFD_REQ_NODE_ROLE_BYNAME,
......
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