Use consistent language for primary mode

I didn't call it "router" anywhere else, but the state in the list is
called "coordinator" so, call it "coordinator mode".
This commit is contained in:
Joshua Boniface 2022-05-06 15:39:06 -04:00
parent 7a40c7a55b
commit c401a1f655
3 changed files with 10 additions and 10 deletions

View File

@ -224,7 +224,7 @@ def node_domain_state(zkhandler, node):
@ZKConnection(config) @ZKConnection(config)
def node_secondary(zkhandler, node): def node_secondary(zkhandler, node):
""" """
Take NODE out of primary router mode. Take NODE out of primary coordinator mode.
""" """
retflag, retdata = pvc_node.secondary_node(zkhandler, node) retflag, retdata = pvc_node.secondary_node(zkhandler, node)
@ -240,7 +240,7 @@ def node_secondary(zkhandler, node):
@ZKConnection(config) @ZKConnection(config)
def node_primary(zkhandler, node): def node_primary(zkhandler, node):
""" """
Set NODE to primary router mode. Set NODE to primary coordinator mode.
""" """
retflag, retdata = pvc_node.primary_node(zkhandler, node) retflag, retdata = pvc_node.primary_node(zkhandler, node)

View File

@ -486,7 +486,7 @@ def cli_node():
@cluster_req @cluster_req
def node_secondary(node, wait): def node_secondary(node, wait):
""" """
Take NODE out of primary router mode. Take NODE out of primary coordinator mode.
""" """
task_retcode, task_retdata = pvc_provisioner.task_status(config, None) task_retcode, task_retdata = pvc_provisioner.task_status(config, None)
@ -539,7 +539,7 @@ def node_secondary(node, wait):
@cluster_req @cluster_req
def node_primary(node, wait): def node_primary(node, wait):
""" """
Put NODE into primary router mode. Put NODE into primary coordinator mode.
""" """
task_retcode, task_retdata = pvc_provisioner.task_status(config, None) task_retcode, task_retdata = pvc_provisioner.task_status(config, None)

View File

@ -91,7 +91,7 @@ def secondary_node(zkhandler, node):
if daemon_mode == "hypervisor": if daemon_mode == "hypervisor":
return ( return (
False, False,
'ERROR: Cannot change router mode on non-coordinator node "{}"'.format( 'ERROR: Cannot change coordinator mode on non-coordinator node "{}"'.format(
node node
), ),
) )
@ -104,9 +104,9 @@ def secondary_node(zkhandler, node):
# Get current state # Get current state
current_state = zkhandler.read(("node.state.router", node)) current_state = zkhandler.read(("node.state.router", node))
if current_state == "secondary": if current_state == "secondary":
return True, 'Node "{}" is already in secondary router mode.'.format(node) return True, 'Node "{}" is already in secondary coordinator mode.'.format(node)
retmsg = "Setting node {} in secondary router mode.".format(node) retmsg = "Setting node {} in secondary coordinator mode.".format(node)
zkhandler.write([("base.config.primary_node", "none")]) zkhandler.write([("base.config.primary_node", "none")])
return True, retmsg return True, retmsg
@ -124,7 +124,7 @@ def primary_node(zkhandler, node):
if daemon_mode == "hypervisor": if daemon_mode == "hypervisor":
return ( return (
False, False,
'ERROR: Cannot change router mode on non-coordinator node "{}"'.format( 'ERROR: Cannot change coordinator mode on non-coordinator node "{}"'.format(
node node
), ),
) )
@ -137,9 +137,9 @@ def primary_node(zkhandler, node):
# Get current state # Get current state
current_state = zkhandler.read(("node.state.router", node)) current_state = zkhandler.read(("node.state.router", node))
if current_state == "primary": if current_state == "primary":
return True, 'Node "{}" is already in primary router mode.'.format(node) return True, 'Node "{}" is already in primary coordinator mode.'.format(node)
retmsg = "Setting node {} in primary router mode.".format(node) retmsg = "Setting node {} in primary coordinator mode.".format(node)
zkhandler.write([("base.config.primary_node", node)]) zkhandler.write([("base.config.primary_node", node)])
return True, retmsg return True, retmsg