mirror of
https://github.com/xcat2/confluent.git
synced 2026-01-11 02:22:31 +00:00
Fix collective manager candidates not in nodelist
For switch operations, need to carry over the same logic as other evaluations.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
return ifnamemap
|
||||
|
||||
Reference in New Issue
Block a user