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.
This commit is contained in:
		| @@ -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" | ||||
|     ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user