mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-07-31 18:19:40 +00:00
9dd025bf05
ddns.pm's DNS-update send has a 3-try retry loop, but it only retried on NOTAUTH and -- on the final attempt -- the `next` fell out of the loop without reporting failure. makedns then printed "Completed updating DNS records." and "DNS setup is completed" even when the update was never accepted. Two problems this causes: - SERVFAIL was never retried. named routinely replies SERVFAIL transiently right after a zone (re)load, before the zone is ready to accept dynamic updates; the update succeeds a second or two later. This reliably breaks real flat-cluster provisioning on el9/el10, where the test case's makedns -n runs right after named reloads the zone with the new compute node. - A persistent NOTAUTH/SERVFAIL (retries exhausted) was silently swallowed and reported as success, so a genuinely failed DNS update looked like it worked. Extract the batch send into send_ddns_update(), which retries NOTAUTH and SERVFAIL (pausing on SERVFAIL), returns 0 only on NOERROR, and otherwise emits the error and returns 1. Both batch-send sites now `return 1 if send_ddns_update(...)`, so a real failure aborts add_or_delete_records instead of falsely reporting success. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>