Repository navigation
test(e2e): add real-vm gate for native cloud initialization - #10253
Draft
Abigail Liang (abigailliang-aks-sig-node) wants to merge 5 commits into
Draft
Abigail Liang (abigailliang-aks-sig-node) wants to merge 5 commits into
Abigail Liang (abigailliang-aks-sig-node) wants to merge 5 commits into
Conversation
Abigail Liang (abigailliang-aks-sig-node)
added this pull request to stack #10254
December 4, 2026 00:12
Contributor
Windows Unit Test Results 3 files 21 suites 1m 16s ⏱️ Results for commit c6e2cf7. ♻️ This comment has been updated with latest results. |
Abigail Liang (abigailliang-aks-sig-node)
force-pushed
the
abigailliang/anc-cloud-init-e2e-gate
branch
4 times, most recently
from
December 5, 2026 00:22
000cd2c to
0ac4eda
Compare
Standard E2E installs the PR-built ANC only as the provisioning hotfix, so init-cloud still runs the ANC already on the VHD and does not exercise native cloud initialization until a VHD is built from the change. Add a manual gate (.pipelines/e2e-anc-cloud-init.yaml, tag nativecloudinit=true) with six Ubuntu 22.04 and Azure Linux 3 scenarios: native opted-in, native opted-out and NBC precedence. A boothook fixture installs the PR-built ANC at both the VHD and hotfix paths, instruments the real init-aks-cloud.sh, and serves the public vendor repositories through a loopback proxy used as the RepoDepot endpoint. Each scenario provisions through Node Ready and checks the empty handoff marker, which initializer ran and from which binary, repository traffic, and on opted-in native VMs, that the WireServer certificates verify against the system trust bundle and that the refresh schedule runs the VHD binary without changing repositories. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 27252e94-5b2b-4932-9585-70e98b9e21e4
Running the gate on real VMs failed on three test-side checks: - WireServer can serve expired CA certificates, which legacy initialization also installs, so trust validation ignores validity periods. - Successful provisioning deletes its inputs, so the NBC precedence scenario checks the ANC log entry recording that both were provided. - The E2E egress firewall blocks https://archive.ubuntu.com and allows the Azure Ubuntu mirror only over HTTP, so the repository proxy forwards Ubuntu there. apt still verifies the signed metadata. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 27252e94-5b2b-4932-9585-70e98b9e21e4
Legacy Mariner is no longer supported by the native cloud initialization path, so it is not pending VM coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 27252e94-5b2b-4932-9585-70e98b9e21e4
Add Ubuntu 22.04 and Azure Linux 3 scenarios whose node configuration reports a legacy location (usseceast) without the certificate opt-in, so native initialization selects the legacy certificate endpoint. They check that initialization continues past public WireServer's empty legacy package, and run the scheduled refresh in a network namespace whose WireServer double serves a generated root only from the legacy endpoint: the refresh must never query the opt-in endpoint and must install the root into the system trust bundle. Also share the repository validator with these scenarios, make the NBC-precedence unit-test fixture include the ANC log line its validator requires, add a case where that line is missing, and document the eight scenarios in the e2e README. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 27252e94-5b2b-4932-9585-70e98b9e21e4
aks-node-controller now prefixes its refresh cron entry with a PATH that includes the sbin directories, so update-ca-certificates resolves under cron on Ubuntu. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 27252e94-5b2b-4932-9585-70e98b9e21e4
Abigail Liang (abigailliang-aks-sig-node)
force-pushed
the
abigailliang/anc-cloud-init-e2e-gate
branch
from
December 5, 2026 00:51
0ac4eda to
c6e2cf7
Compare
Contributor
Contributor
Contributor
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Standard E2E installs the PR-built ANC only as the provisioning hotfix.
init-cloudtherefore runs the ANC already on the VHD, and #10252 is not exercised until a VHD is built from it. This PR adds a manual real-VM gate that also installs the PR-built ANC at the VHD path, simulating such a VHD.Pipeline:
.pipelines/e2e-anc-cloud-init.yaml(manual, scenario tagnativecloudinit=true).Scenarios: eight, each provisioning through Node Ready and the normal pod validations.
Ubuntu2204_NativeCloudInit_OptedInUbuntu2204_NativeCloudInit_NotOptedInUbuntu2204_NativeCloudInit_LegacyCertEndpointUbuntu2204_CloudInit_NBCPrecedenceAzureLinuxV3_NativeCloudInit_OptedInAzureLinuxV3_NativeCloudInit_NotOptedInAzureLinuxV3_NativeCloudInit_LegacyCertEndpointAzureLinuxV3_CloudInit_NBCPrecedenceThe legacy-endpoint scenarios set only the node location to
usseceast, which selects the legacy certificate endpoint used by USSec and USNat. The VM, cluster, ARM and identity stay in public Azure, and no opt-in tag is requested.Fixture: a boothook installs the hash-checked PR-built ANC and instruments the real
init-aks-cloud.sh. A loopback proxy (e2e/cmd/cloud-repo-proxy), used as the RepoDepot endpoint, serves the public Ubuntu and Microsoft repositories.akscustominput contract to set a RepoDepot endpoint.Checks:
init-cloudcompleted and wrote the empty marker.usseceastand, like the shell, continues past the empty legacy package that public WireServer returns;Shared E2E code changes are limited to two items:
vmss.go(if/else becomes a switch, and the Go build helper is extracted), plus a new case for this fixture.e2e_run.shthat runs only whenREQUIRE_NATIVE_CLOUD_INTEGRATION=true.Other scenarios and pipelines are unaffected.
Not covered here
Sovereign and custom clouds
akscustominput contract and a loopback RepoDepot proxy, and do not reproduce an air-gapped network.ussecorusnatselect the legacy certificate endpoint. The legacy-endpoint scenarios select it by location only, and check certificate installation against a WireServer double because public WireServer's legacy package is empty. Real sovereign certificates, VHDs and HTTPS RepoDepot endpoints are not covered.init-cloudruns the ANC on the VHD, so validation in a real custom cloud needs a released VHD that contains feat(anc): initialize Azure cloud natively in init-cloud for AKSNodeConfig #10252. That validation is required before the native path is enabled in those clouds.Running it
Microsoft.Compute/PlatformSettingsOverrideregistered and does not auto-inject the RCV1P opt-in tag.e2e/README.md, section "Native cloud-initialization integration gate".Results
Ran locally on real VMs in westus3, because the pipeline is not registered yet. Both runs used #10252 at
9efe3bad02.PATHon both refresh cron entries soupdate-ca-certificatesresolves on Ubuntu. Unit tests and ShellSpec cover them; the cron entry was also checked with a real cron daemon in an Ubuntu 22.04 container.Which issue(s) this PR fixes: