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:
parent
7a40c7a55b
commit
c401a1f655
|
@ -224,7 +224,7 @@ def node_domain_state(zkhandler, node):
|
|||
@ZKConnection(config)
|
||||
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)
|
||||
|
||||
|
@ -240,7 +240,7 @@ def node_secondary(zkhandler, node):
|
|||
@ZKConnection(config)
|
||||
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)
|
||||
|
||||
|
|
|
@ -486,7 +486,7 @@ def cli_node():
|
|||
@cluster_req
|
||||
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)
|
||||
|
@ -539,7 +539,7 @@ def node_secondary(node, wait):
|
|||
@cluster_req
|
||||
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)
|
||||
|
|
|
@ -91,7 +91,7 @@ def secondary_node(zkhandler, node):
|
|||
if daemon_mode == "hypervisor":
|
||||
return (
|
||||
False,
|
||||
'ERROR: Cannot change router mode on non-coordinator node "{}"'.format(
|
||||
'ERROR: Cannot change coordinator mode on non-coordinator node "{}"'.format(
|
||||
node
|
||||
),
|
||||
)
|
||||
|
@ -104,9 +104,9 @@ def secondary_node(zkhandler, node):
|
|||
# Get current state
|
||||
current_state = zkhandler.read(("node.state.router", node))
|
||||
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")])
|
||||
|
||||
return True, retmsg
|
||||
|
@ -124,7 +124,7 @@ def primary_node(zkhandler, node):
|
|||
if daemon_mode == "hypervisor":
|
||||
return (
|
||||
False,
|
||||
'ERROR: Cannot change router mode on non-coordinator node "{}"'.format(
|
||||
'ERROR: Cannot change coordinator mode on non-coordinator node "{}"'.format(
|
||||
node
|
||||
),
|
||||
)
|
||||
|
@ -137,9 +137,9 @@ def primary_node(zkhandler, node):
|
|||
# Get current state
|
||||
current_state = zkhandler.read(("node.state.router", node))
|
||||
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)])
|
||||
|
||||
return True, retmsg
|
||||
|
|
Loading…
Reference in New Issue