Skip to content

fix(e2e): gunzip nbc-cmd source in CustomDataWithNBCCmdHack for Flatcar/ACL#8360

Merged
awesomenix merged 1 commit intomainfrom
aganeshkumar/fix-nbc-cmd-hack-flatcar-gunzip
Apr 21, 2026
Merged

fix(e2e): gunzip nbc-cmd source in CustomDataWithNBCCmdHack for Flatcar/ACL#8360
awesomenix merged 1 commit intomainfrom
aganeshkumar/fix-nbc-cmd-hack-flatcar-gunzip

Conversation

@ganeshkumarashok
Copy link
Copy Markdown
Contributor

Summary

PR #8357 added compression: gzip to the flatcar ignition entry for aks-node-controller-nbc-cmd.sh. The base64 payload now decodes to gzip bytes — Ignition gunzips at write time on real nodes, so production is fine.

The e2e helper CustomDataWithNBCCmdHack (in e2e/vmss.go) reuses the same base64 source from the ignition config but re-emits it through cloud-config !!binary, which only base64-decodes. As a result the renamed nbc-cmd-hack.sh ended up containing raw gzip bytes, and CSE failed with cannot execute binary file (exit 126) on every Flatcar/ACL scriptless-NBC scenario (e.g. Test_AzureLinuxV3_ACL_GPUA100/scriptless_nbc).

This PR detects the compression: gzip hint and gunzips the payload before re-encoding it for !!binary.

Failure signature

/opt/azure/containers/aks-node-controller-nbc-cmd-hack.sh: cannot execute binary file
exit 126

Observed in main-branch build 161132296 on all ACL_GPU* scriptless_nbc scenarios after #8357 merged.

Test plan

  • Re-run GPU E2E pipeline against this branch and confirm *ACL_GPU*/scriptless_nbc scenarios get past CSE
  • Confirm Ubuntu boothook scriptless_nbc scenarios remain green (unchanged path — boothookTemplate already does base64 -d | gzip -d itself)

…ar/ACL

PR #8357 added `compression: gzip` to the flatcar ignition entry for
aks-node-controller-nbc-cmd.sh, so the base64 payload now decodes to
gzip bytes (Ignition gunzips at write time).

CustomDataWithNBCCmdHack reuses that base64 source but re-emits via
cloud-config `!!binary`, which only base64-decodes. The resulting
nbc-cmd-hack.sh ended up containing raw gzip bytes, so CSE exec failed
with "cannot execute binary file" (exit 126) on every Flatcar/ACL
scriptless-NBC scenario (ACL_GPU* tests).

Detect the gzip compression hint and gunzip the payload before
re-encoding for `!!binary`.
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 fixes a regression in the e2e VMSS helper that converts Flatcar Ignition JSON into cloud-config for scriptless NBC scenarios. After PR #8357 started marking the Ignition aks-node-controller-nbc-cmd*.sh file contents as compression: gzip, the e2e helper was re-emitting gzipped bytes via cloud-config !!binary (base64 decode only), causing CSE to fail when attempting to execute the resulting file.

Changes:

  • Detect contents.compression == "gzip" in the Flatcar ignition storage.files entry for the NBC cmd script and gunzip the decoded payload.
  • Re-base64 encode the plaintext script so !!binary writes valid shell content.

@awesomenix awesomenix merged commit c68290b into main Apr 21, 2026
28 of 35 checks passed
@awesomenix awesomenix deleted the aganeshkumar/fix-nbc-cmd-hack-flatcar-gunzip branch April 21, 2026 01:39
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