fix: acl hostname seems to be set further down boot order, wait for hostname to converge#8320
fix: acl hostname seems to be set further down boot order, wait for hostname to converge#8320awesomenix merged 1 commit intomainfrom
Conversation
…ostname to converge
There was a problem hiding this comment.
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
hostnameequals the contents of/etc/hostname. - Runs the wait before resolving controller binary/config paths to avoid starting the controller too early.
| until [ "$(hostname)" = "$(cat /etc/hostname)" ]; do | ||
| sleep 1 | ||
| done |
There was a problem hiding this comment.
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.
| set -uo pipefail | ||
|
|
||
| until [ "$(hostname)" = "$(cat /etc/hostname)" ]; do | ||
| sleep 1 |
There was a problem hiding this comment.
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.
| sleep 1 | |
| sleep 1 |
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.