Skip to content

feat(anc): add enable_provisioning_hotfix contract field (2.1d)#8917

Open
Devinwong wants to merge 5 commits into
mainfrom
devinwong/anc-hotfix-env-delivery
Open

feat(anc): add enable_provisioning_hotfix contract field (2.1d)#8917
Devinwong wants to merge 5 commits into
mainfrom
devinwong/anc-hotfix-env-delivery

Conversation

@Devinwong

@Devinwong Devinwong commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

What

Adds the AKSNodeConfig contract 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 on main.

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]
Loading

File written: /opt/azure/containers/enabled_features.sh containing ENABLE_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)

  • proto: enable_provisioning_hotfix = 45 (bool, default false) + regenerated Go bindings (GetEnableProvisioningHotfix()).
  • utils.go: enabledFeaturesBlock(cfg) emits the boothook snippet writing enabled_features.sh only when the field is true.
  • utils_test.go: off byte-identical, on writes the exact line + 0600, path matches the wrapper contract.

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-controller dependency to the tag cut after this merges.

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>
Copilot AI review requested due to automatic review settings July 13, 2026 20:55
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJul 13, 2026, 11:10 PM

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 the aksnodeconfig.v1.Configuration proto and regenerated Go bindings.
  • Updated nodeconfigutils.CustomData to optionally emit a cloud-boothook snippet that writes /opt/azure/containers/enabled_features.sh with ENABLE_PROVISIONING_HOTFIX=true and chmod 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

Comment thread aks-node-controller/pkg/nodeconfigutils/utils_test.go Outdated
Comment thread aks-node-controller/pkg/nodeconfigutils/utils_test.go Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 13, 2026 21:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 4 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • aks-node-controller/pkg/gen/aksnodeconfig/v1/config.pb.go: Generated file

Address review: wrapper parses KEY=VALUE (does not source enabled_features.sh).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 13, 2026 21:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 4 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • aks-node-controller/pkg/gen/aksnodeconfig/v1/config.pb.go: Generated file

Comment thread aks-node-controller/proto/aksnodeconfig/v1/config.proto
proto3 non-optional bool has no distinct unset state; false covers it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 13, 2026 23:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 4 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • aks-node-controller/pkg/gen/aksnodeconfig/v1/config.pb.go: Generated file

Comment thread aks-node-controller/pkg/gen/aksnodeconfig/v1/config.pb.go
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 13, 2026 23:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 4 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • aks-node-controller/pkg/gen/aksnodeconfig/v1/config.pb.go: Generated file

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