From 184132c398bb9b412456e007d529c49f207f1fd2 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 19 Sep 2025 19:41:54 -0400 Subject: [PATCH] Fix collective manager candidates not in nodelist For switch operations, need to carry over the same logic as other evaluations. --- confluent_server/confluent/networking/macmap.py | 5 ++++- confluent_server/confluent/networking/netutil.py | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/confluent_server/confluent/networking/macmap.py b/confluent_server/confluent/networking/macmap.py index 1bff9e5f..5545e09a 100644 --- a/confluent_server/confluent/networking/macmap.py +++ b/confluent_server/confluent/networking/macmap.py @@ -535,7 +535,10 @@ def _full_updatemacmap(configmanager): if incollective: candmgrs = cfg.get('collective.managercandidates', {}).get('value', None) if candmgrs: - candmgrs = noderange.NodeRange(candmgrs, configmanager).nodes + try: + candmgrs = noderange.NodeRange(candmgrs, configmanager).nodes + except Exception: + candmgrs = noderange.NodeRange(candmgrs).nodes if mycollectivename not in candmgrs: # do not think about trying to find nodes that we aren't possibly # supposed to be a manager for in a collective diff --git a/confluent_server/confluent/networking/netutil.py b/confluent_server/confluent/networking/netutil.py index a1fd6d08..48b2f028 100644 --- a/confluent_server/confluent/networking/netutil.py +++ b/confluent_server/confluent/networking/netutil.py @@ -29,7 +29,10 @@ def get_switchcreds(configmanager, switches): continue candmgrs = switchcfg.get(switch, {}).get('collective.managercandidates', {}).get('value', None) if candmgrs: - candmgrs = noderange.NodeRange(candmgrs, configmanager).nodes + try: + candmgrs = noderange.NodeRange(candmgrs, configmanager).nodes + except Exception: + candmgrs = noderange.NodeRange(candmgrs).nodes if collective.get_myname() not in candmgrs: continue switchparms = switchcfg.get(switch, {}) @@ -81,4 +84,4 @@ def get_portnamemap(conn): ifidx, ifname = vb ifidx = int(str(ifidx).rsplit('.', 1)[1]) ifnamemap[ifidx] = str(ifname) - return ifnamemap \ No newline at end of file + return ifnamemap