Skip to content

Commit cddb423

Browse files
saewoniCopilot
andauthored
Update parts/linux/cloud-init/artifacts/localdns.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5b86ad4 commit cddb423

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

parts/linux/cloud-init/artifacts/localdns.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,9 @@ initialize_network_variables || exit $ERR_LOCALDNS_FAIL
648648
# ---------------------------------------------------------------------------------------------------------------------
649649
cleanup_iptables_and_dns || exit $ERR_LOCALDNS_FAIL
650650

651-
# Wait for the DNS configuration to be reverted.
652-
# This ensures systemd-resolved has removed localdns from resolv.conf before we proceed.
653-
# This is called both at startup (to clean up leftover state) and during shutdown.
651+
# During startup, wait for the DNS configuration to be fully reverted.
652+
# This ensures systemd-resolved has removed localdns from resolv.conf before we read upstream DNS servers.
653+
# Note: the shutdown path does not invoke this wait; it only calls cleanup_iptables_and_dns.
654654
if ! wait_for_localdns_removed_from_resolv_conf 5; then
655655
echo "Error: DNS configuration was not reverted within timeout."
656656
exit $ERR_LOCALDNS_FAIL

0 commit comments

Comments
 (0)