mirror of
https://github.com/xcat2/confluent.git
synced 2025-02-04 21:12:05 +00:00
Age out macmap on node database changes
This mitigates problems where automation fails to quickly react to changes/fixes in the net attributes.
This commit is contained in:
parent
37899ad39e
commit
82ee69b56c
@ -463,6 +463,9 @@ def _recheck_nodes_backend(nodeattribs, configmanager):
|
||||
_map_unique_ids(nodeattribs)
|
||||
# for the nodes whose attributes have changed, consider them as potential
|
||||
# strangers
|
||||
if nodeattribs:
|
||||
macmap.vintage = 0 # expire current mac map data, in case
|
||||
# the attributes changed impacted the result
|
||||
for node in nodeattribs:
|
||||
if node in known_nodes:
|
||||
for somemac in known_nodes[node]:
|
||||
@ -1100,6 +1103,7 @@ needaddhandled = False
|
||||
def _handle_nodelist_change(configmanager):
|
||||
global needaddhandled
|
||||
global nodeaddhandler
|
||||
macmap.vintage = 0 # the current mac map is probably inaccurate
|
||||
_recheck_nodes((), configmanager)
|
||||
if needaddhandled:
|
||||
needaddhandled = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user