Merge pull request #120 from gyptazy/fix/119-maintenance-mode-cli-and-config

Fix maintenance mode when using cli arg and config mode by using the merged list.
This commit is contained in:
Florian
2024-11-09 09:36:57 +01:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
fixed:
- Fix maintenance mode when using cli arg and config mode by using the merged list (by @CartCaved). [#119]

2
proxlb
View File

@@ -880,7 +880,7 @@ def balancing_vm_maintenance(proxlb_config, app_args, node_statistics, vm_statis
maintenance_nodes_list = maintenance_nodes_list + app_args.maintenance.split(',')
# Ensure that only existing nodes in the cluster will be used.
if len(proxlb_config['vm_maintenance_nodes']) > 1:
if len(maintenance_nodes_list) > 1:
maintenance_nodes_list = set(maintenance_nodes_list) & set(nodes_present)
logging.info(f'{info_prefix} Maintenance mode for the following hosts defined: {maintenance_nodes_list}')
else: