From 4555f5a20a4054426bb3aa9f5be0661fefa71455 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 16 Nov 2023 02:15:01 -0500 Subject: [PATCH] Remove warnings when switch coordinator state Tasks are no longer bound to the primary coordinator for state updates due to using KeyDB and a proper shared queue and result backend, so this warning is now obsolete and no longer required. This would interrupt "--wait" commands on provisioner tasks, but we no longer believe that this warrants a warning, as the affected user could simply run "pvc cluster task" to validate or resume the watcher. --- client-cli/pvc/cli/cli.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/client-cli/pvc/cli/cli.py b/client-cli/pvc/cli/cli.py index f8d783b8..7fa7a576 100644 --- a/client-cli/pvc/cli/cli.py +++ b/client-cli/pvc/cli/cli.py @@ -599,18 +599,6 @@ def cli_node_primary( Set NODE in primary coordinator state, making it the primary coordinator for the cluster. """ - # Handle active provisioner task warnings - _, tasks_retdata = pvc.lib.provisioner.task_status(CLI_CONFIG, None) - if len(tasks_retdata) > 0: - echo( - CLI_CONFIG, - f"""\ -NOTE: There are currently {len(tasks_retdata)} active or queued provisioner tasks. - These jobs will continue executing, but their status visibility will be lost until - the current primary node returns to primary state. - """, - ) - retcode, retdata = pvc.lib.node.node_coordinator_state(CLI_CONFIG, node, "primary") if not retcode or "already" in retdata: finish(retcode, retdata) @@ -649,18 +637,6 @@ def cli_node_secondary( Set NODE in secondary coordinator state, making another active node the primary node for the cluster. """ - # Handle active provisioner task warnings - _, tasks_retdata = pvc.lib.provisioner.task_status(CLI_CONFIG, None) - if len(tasks_retdata) > 0: - echo( - CLI_CONFIG, - f"""\ -NOTE: There are currently {len(tasks_retdata)} active or queued provisioner tasks. - These jobs will continue executing, but their status visibility will be lost until - the current primary node returns to primary state. - """, - ) - retcode, retdata = pvc.lib.node.node_coordinator_state( CLI_CONFIG, node, "secondary" )