Skip to content

fix: add ACL-specific butane config with first-boot service workaround#8447

Merged
awesomenix merged 1 commit intomainfrom
aadagarwal/fix-customdata-acl
May 4, 2026
Merged

fix: add ACL-specific butane config with first-boot service workaround#8447
awesomenix merged 1 commit intomainfrom
aadagarwal/fix-customdata-acl

Conversation

@aadhar-agarwal
Copy link
Copy Markdown
Contributor

@aadhar-agarwal aadhar-agarwal commented May 1, 2026

What this PR does / why we need it:

  • Adds an ACL-specific Butane config (acl.yml) with explicit storage.links symlinks for the ignition-bootcmds and ignition-file-extract services into sysinit.target.wants.

  • Reorder nodecustomdata.yml conditionals to check IsACL before IsAzlOSGuard

    • ACL uses CustomizedImageLinuxGuard for BYOI image testing, so IsAzlOSGuard also matches ACL nodes. Check IsACL first to avoid using OSGuard provisioning scripts, which are incompatible with ACL. To fix this, the goal is to end up using CustomizedImageTrustedLaunch to test BYOI images - Need to enable this in aks-rp

Why: On ACL, machine-id is empty (not absent) after VHD build. systemd only triggers ConditionFirstBoot=yes when machine-id is missing, so enabled services don't start on first boot. On Flatcar, waagent's CoreOS deprovisioning removes machine-id entirely, avoiding this issue. The explicit symlinks ensure these services start regardless of first-boot stat

Testing

Which issue(s) this PR fixes:

Fixes #

Copilot AI review requested due to automatic review settings May 1, 2026 18:15
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

This PR adds an ACL (Azure Container Linux) specific Butane template to ensure first-boot systemd services run correctly when /etc/machine-id is left empty after VHD build, and updates the Flatcar/ACL Ignition generation path to select the appropriate template. It also reorders nodecustomdata.yml conditionals so ACL nodes don’t incorrectly take the AzlOSGuard path when both match.

Changes:

  • Add parts/linux/cloud-init/acl.yml with ACL-specific systemd enablement symlink workaround.
  • Parameterize cloudInitToButane() to accept a Butane YAML path and select ACL vs Flatcar template based on config.IsACL().
  • Reorder nodecustomdata.yml conditionals to check IsACL before IsAzlOSGuard.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/agent/const.go Adds a constant for the ACL Butane template path (linux/cloud-init/acl.yml).
pkg/agent/baker.go Parameterizes Butane conversion and selects ACL vs Flatcar Butane template when generating Ignition customData.
pkg/agent/baker_test.go Updates tests to pass the Flatcar Butane template path into cloudInitToButane.
parts/linux/cloud-init/nodecustomdata.yml Reorders templating conditionals so ACL uses ACL-specific provisioning scripts instead of AzlOSGuard ones.
parts/linux/cloud-init/acl.yml Introduces ACL-specific Butane config with explicit sysinit.target.wants symlinks.

Comment thread pkg/agent/baker.go
Comment thread pkg/agent/baker.go
Copilot AI review requested due to automatic review settings May 1, 2026 18:29
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/fix-customdata-acl branch from 9f57d5c to 4e79cfe Compare May 1, 2026 18:29
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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread parts/linux/cloud-init/acl.yml
Comment thread parts/linux/cloud-init/nodecustomdata.yml
Comment thread pkg/agent/baker.go
Comment thread parts/linux/cloud-init/nodecustomdata.yml
@awesomenix awesomenix merged commit 7e09916 into main May 4, 2026
46 of 50 checks passed
@awesomenix awesomenix deleted the aadagarwal/fix-customdata-acl branch May 4, 2026 18:22
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.

4 participants