Skip to content

fix: acl hostname seems to be set further down boot order, wait for hostname to converge#8320

Merged
awesomenix merged 1 commit intomainfrom
nishp/fix/aclprov
Apr 15, 2026
Merged

fix: acl hostname seems to be set further down boot order, wait for hostname to converge#8320
awesomenix merged 1 commit intomainfrom
nishp/fix/aclprov

Conversation

@awesomenix
Copy link
Copy Markdown
Contributor

this was a hard one, seems like on acl the hostname coverges full 5seconds after provisioning is complete. Add a helper script to wait for hostname to converge, which is very fast on ubuntu.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds an early boot guard to ensure the node hostname matches /etc/hostname before starting aks-node-controller, addressing delayed hostname convergence on ACL images.

Changes:

  • Introduces a wait loop that blocks until hostname equals the contents of /etc/hostname.
  • Runs the wait before resolving controller binary/config paths to avoid starting the controller too early.

Comment on lines +4 to +6
until [ "$(hostname)" = "$(cat /etc/hostname)" ]; do
sleep 1
done
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This loop can block forever if hostname convergence never happens (e.g., /etc/hostname is updated later than expected, hostname is intentionally different, or a provisioning issue occurs). Add a bounded timeout (and ideally a log message on each wait / on timeout) so the VM doesn’t hang indefinitely and you get diagnostics when convergence fails.

Copilot uses AI. Check for mistakes.
set -uo pipefail

until [ "$(hostname)" = "$(cat /etc/hostname)" ]; do
sleep 1
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation is inconsistent here (3 spaces). Align indentation with the rest of the script (commonly 2 spaces or a tab) to keep formatting consistent and avoid noisy diffs in future edits.

Suggested change
sleep 1
sleep 1

Copilot uses AI. Check for mistakes.
@awesomenix awesomenix enabled auto-merge (squash) April 15, 2026 17:13
@awesomenix awesomenix disabled auto-merge April 15, 2026 18:34
@awesomenix awesomenix merged commit e7d35a6 into main Apr 15, 2026
33 of 36 checks passed
@awesomenix awesomenix deleted the nishp/fix/aclprov branch April 15, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants