From c401a1f65506058486f0ecad80d91ee27cc0d096 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 6 May 2022 15:39:06 -0400 Subject: [PATCH] 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". --- api-daemon/pvcapid/helper.py | 4 ++-- client-cli/pvc/pvc.py | 4 ++-- daemon-common/node.py | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-daemon/pvcapid/helper.py b/api-daemon/pvcapid/helper.py index 7d5d21a3..e1fb5d05 100755 --- a/api-daemon/pvcapid/helper.py +++ b/api-daemon/pvcapid/helper.py @@ -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) diff --git a/client-cli/pvc/pvc.py b/client-cli/pvc/pvc.py index 85bf4703..b7a759ed 100755 --- a/client-cli/pvc/pvc.py +++ b/client-cli/pvc/pvc.py @@ -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) diff --git a/daemon-common/node.py b/daemon-common/node.py index bd1d5a99..27dd8d92 100644 --- a/daemon-common/node.py +++ b/daemon-common/node.py @@ -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