feat(anc): add enable_provisioning_hotfix contract field (2.1d)#8917
Open
Devinwong wants to merge 5 commits into
Open
feat(anc): add enable_provisioning_hotfix contract field (2.1d)#8917Devinwong wants to merge 5 commits into
Devinwong wants to merge 5 commits into
Conversation
Add the AKSNodeConfig proto contract field enable_provisioning_hotfix (field 45, default false) and render the on-node enabled_features.sh from it in the scriptless boothook custom data. - proto: new bool enable_provisioning_hotfix = 45; regenerated Go bindings expose Configuration.GetEnableProvisioningHotfix(). - nodeconfigutils.CustomData: enabledFeaturesBlock(cfg) emits a cloud-boothook snippet writing /opt/azure/containers/enabled_features.sh with ENABLE_PROVISIONING_HOTFIX=true (0600) only when the field is true. When false/unset it returns "" so custom data is byte-identical to today, preserving the 6-month VHD backward-compat window. The 2.1c wrapper already reads enabled_features.sh and gates check-hotfix on ENABLE_PROVISIONING_HOTFIX=true (fail-open). aks-rp sets this field on the scriptless path to enable provisioning hotfix per region. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new AKSNodeConfig contract field to control provisioning-time hotfix behavior, and wires it into custom-data generation so the on-node wrapper can gate check-hotfix via an early-boot feature flag file.
Changes:
- Added
enable_provisioning_hotfix(field 45) to theaksnodeconfig.v1.Configurationproto and regenerated Go bindings. - Updated
nodeconfigutils.CustomDatato optionally emit a cloud-boothook snippet that writes/opt/azure/containers/enabled_features.shwithENABLE_PROVISIONING_HOTFIX=trueandchmod 0600. - Added unit tests validating off-case omission / on-case emission and the shared wrapper path contract.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| aks-node-controller/proto/aksnodeconfig/v1/config.proto | Adds the new enable_provisioning_hotfix contract field (tag 45). |
| aks-node-controller/pkg/nodeconfigutils/utils.go | Emits an optional boothook block to write the enabled_features.sh flag file when enabled. |
| aks-node-controller/pkg/nodeconfigutils/utils_test.go | Adds tests for off/on behavior and validates the wrapper path contract (plus minor comment wording fixes needed). |
| aks-node-controller/pkg/gen/aksnodeconfig/v1/config.pb.go | Regenerated Go bindings exposing GetEnableProvisioningHotfix(). |
Files not reviewed (1)
- aks-node-controller/pkg/gen/aksnodeconfig/v1/config.pb.go: Generated file
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Address review: wrapper parses KEY=VALUE (does not source enabled_features.sh). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
proto3 non-optional bool has no distinct unset state; false covers it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Adds the
AKSNodeConfigcontract field that turns on provisioning-time hotfix checking on a node. This is the producer half of the feature; the consumer (the 2.1c wrapper) already ships onmain.How it works
flowchart TD A[aks-rp region toggle] --> B[enable_provisioning_hotfix = true] B --> C[nodeconfigutils.CustomData] C -->|boothook writes| D[enabled_features.sh 0600] D -->|wrapper reads| E[aks-node-controller-wrapper.sh] E -->|gates| F[check-hotfix]File written:
/opt/azure/containers/enabled_features.shcontainingENABLE_PROVISIONING_HOTFIX=true.When the field is false (the default), no boothook block is emitted, the file is not written, and the wrapper's gate is not taken — custom data is byte-identical to today.
Changes (4 files)
enable_provisioning_hotfix = 45(bool, default false) + regenerated Go bindings (GetEnableProvisioningHotfix()).enabledFeaturesBlock(cfg)emits the boothook snippet writingenabled_features.shonly when the field is true.Compatibility
Default-OFF and fail-open end to end. Preserves the 6-month VHD backward-compat window (older VHD + newer CSE and vice-versa both safe).
Consumer
aks-rp sets this field on the scriptless path behind a region toggle and bumps its
aks-node-controllerdependency to the tag cut after this merges.