Skip to content

fix: exclude ACL from node-exporter and post-deprovision WALinuxAgent install#8036

Open
aadhar-agarwal wants to merge 2 commits intomainfrom
aadagarwal/acl-node-exporter
Open

fix: exclude ACL from node-exporter and post-deprovision WALinuxAgent install#8036
aadhar-agarwal wants to merge 2 commits intomainfrom
aadagarwal/acl-node-exporter

Conversation

@aadhar-agarwal
Copy link
Contributor

@aadhar-agarwal aadhar-agarwal commented Mar 7, 2026

PR #7704 missed ACL when adding node-exporter, causing exit code 113 (ERR_PACKER_COPY_FILE) on ACL VHD builds. Follows the Flatcar pattern: guard in packer_source.sh, file uploads in ACL packer JSON, and skip in VHD content tests.

PR #7987 added post-deprovision WALinuxAgent install but the guard in packer_source.sh only excluded Flatcar, not ACL. ACL also does not upload these files via its packer JSON, causing the same exit code 113 failure pattern. Adds isACL to the guard and skips testWALinuxAgentInstalled for AzureContainerLinux.

[TEST All VHDs] AKS Linux VHD Build - Msft Tenant - https://msazure.visualstudio.com/CloudNativeCompute/_build/results?buildId=155800738&view=results

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Copy link
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

Excludes Azure Container Linux (ACL) from node-exporter VHD build steps to prevent Packer file-copy failures introduced when node-exporter was added to the VHD build pipeline.

Changes:

  • Add ACL handling to skip node-exporter file installation/copy steps during VHD build.
  • Update VHD content tests to skip node-exporter assertions on ACL.
  • Update e2e validator documentation/comments to reflect node-exporter installation scope.

Reviewed changes

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

Show a summary per file
File Description
vhdbuilder/packer/vhd-image-builder-acl.json Uploads node-exporter-related scripts/assets into the ACL Packer build context.
vhdbuilder/packer/test/linux-vhd-content-test.sh Skips node-exporter content validation on ACL.
vhdbuilder/packer/packer_source.sh Skips copying node-exporter assets on ACL (avoids ERR_PACKER_COPY_FILE).
vhdbuilder/packer/install-dependencies.sh Updates node-exporter skip comment to include ACL.
e2e/validators.go Updates node-exporter validator comments to reflect supported VHDs.

PR #7704 missed ACL when adding node-exporter, causing exit code 113
(ERR_PACKER_COPY_FILE) on ACL VHD builds. Follows the Flatcar pattern:
guard in packer_source.sh, file uploads in ACL packer JSON, and skip
in VHD content tests.

Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>
PR #7987 added post-deprovision WALinuxAgent install but the guard in
packer_source.sh only excluded Flatcar, not ACL. ACL also does not
upload these files via its packer JSON, causing the same exit code 113
failure pattern. Adds isACL to the guard and skips testWALinuxAgentInstalled
for AzureContainerLinux.

Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/acl-node-exporter branch from 2892cda to ce27b33 Compare March 7, 2026 02:07
@aadhar-agarwal aadhar-agarwal changed the title fix: exclude ACL from node-exporter VHD build fix: exclude ACL from node-exporter and WALinuxAgent VHD build guards Mar 7, 2026
@aadhar-agarwal aadhar-agarwal changed the title fix: exclude ACL from node-exporter and WALinuxAgent VHD build guards fix: exclude ACL from node-exporter and post-deprovision WALinuxAgent install Mar 7, 2026
@aadhar-agarwal aadhar-agarwal marked this pull request as ready for review March 7, 2026 03:00
Copilot AI review requested due to automatic review settings March 7, 2026 03:00
Copy link
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 6 out of 6 changed files in this pull request and generated 2 comments.

Comment on lines 1414 to 1417
// Check if node-exporter is installed on this VHD by looking for the skip sentinel file.
// The skip file is only present on VHDs that have node-exporter installed (Ubuntu, Mariner, Azure Linux).
// Flatcar, OSGuard, and older VHDs do not have node-exporter installed and will not have the skip file.
// Flatcar, ACL, OSGuard, and older VHDs do not have node-exporter installed and will not have the skip file.
if !fileExist(ctx, s, skipFile) {
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

This comment states node-exporter is installed on “Mariner”, but the VHD build/test logic elsewhere skips node-exporter on Mariner (components.json has an empty versions list for mariner, and linux-vhd-content-test.sh treats CBLMariner as a skip SKU). Please correct the comment to avoid suggesting Mariner VHDs should have the sentinel file.

Copilot uses AI. Check for mistakes.
Comment on lines 501 to 504
"node-exporter")
# Skipping is handled by empty versionsV2 arrays in components.json
# for mariner, flatcar, and osguard. Kata is skipped explicitly here.
# for mariner, flatcar, acl, and osguard. Kata is skipped explicitly here.
if [ "${IS_KATA}" = "true" ]; then
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

The comment says skipping node-exporter is handled by empty versionsV2 arrays for "acl", but parts/common/components.json has no ACL/azurecontainerlinux entry for node-exporter at all (only ubuntu/azurelinux/mariner/flatcar). For ACL the skip is likely because there’s no matching downloadURIs key, not because an empty versions list was provided—please update the comment to reflect the actual mechanism to avoid future confusion.

Copilot uses AI. Check for mistakes.
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.

2 participants