2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-29 13:00:03 +00:00

Fix adding nodes with uuid for pxe

When adding nodes, they wouldn't be tracked for PXE
until id.uuid changed, or service restarted.

Fix by explicitly remapping all added and new names.
This commit is contained in:
Jarrod Johnson 2022-01-26 08:35:10 -05:00
parent fd00a70075
commit effaba9661

View File

@ -494,6 +494,10 @@ def new_nodes(added, deleting, renamed, configmanager):
configmanager.remove_watcher(attribwatcher)
alldeleting = set(deleting) | set(renamed)
clear_nodes(alldeleting)
alladding = set(added)
for oldname in renamed:
alladding.add(renamed[oldname])
remap_nodes(alladding, configmanager)
attribwatcher = configmanager.watch_attributes(configmanager.list_nodes(),
('id.uuid', 'net.*hwaddr'), remap_nodes)