mirror of
				https://github.com/xcat2/confluent.git
				synced 2025-10-31 03:12:31 +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:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user