Skip to content

fix(infra): retry cluster ARM step on Key Vault RBAC propagation (AROSLSRE-1918) - #6708

Merged
openshift-merge-bot[bot] merged 1 commit into
Azure:mainfrom
raelga:raelg/retry-keyvault-rbac-propagation
Aug 29, 2026
Merged

fix(infra): retry cluster ARM step on Key Vault RBAC propagation (AROSLSRE-1918)#6708
openshift-merge-bot[bot] merged 1 commit into
Azure:mainfrom
raelga:raelg/retry-keyvault-rbac-propagation

Conversation

@raelga

Copy link
Copy Markdown
Collaborator

Jira: AROSLSRE-1918

What

Add ForbiddenByRbac to the existing automatedRetry.errorContainsAny list on the cluster ARM step in both dev-infrastructure/svc-pipeline.yaml and dev-infrastructure/mgmt-pipeline.yaml.

Why

During a prod Canary GlobalBuildout in eastus2euap, the Service.Infra cluster step failed with ForbiddenByRbac on Microsoft.KeyVault/vaults/keys/write for the aks-etcd-encryption key. Creating that key via bicep is a control-plane write, so the deployment identity needs a Key Vault role that grants keys/write. On a fresh region the role assignment can lag propagation, and the whole rollout step fails. Both cluster steps deploy aks-cluster-base.bicep and create that key, so both can hit the same race. The retry lets the step recover once the assignment lands.

This only covers the propagation race. A genuinely missing grant still fails after the retries, same as today, just a few minutes later.

Testing

make validate-config-pipelines passes. This is a pipeline config change with no code path to unit test; the retry itself is exercised by EV2 at rollout time.

Special notes for your reviewer

errorContainsAny is an OR match and case-insensitive, so I matched the stable error code ForbiddenByRbac rather than a longer phrase. Rollout to int/stg/prod happens via sdp-pipelines after this merges.

PR Checklist

  • PR is scoped to a single task (no mixed concerns)
  • Title follows Conventional Commits format
  • Summary explains the "Why" behind the change
  • Linked to relevant ticket/issue
  • Screenshots included (if graph/UI/metrics changes)
  • Self-reviewed the diff
  • CI/CD checks are passing (ignore Tide)
  • Draft PR used for WIP (if applicable)
  • Commit history is clean (rebased/squashed)
  • Tricky code blocks are commented
  • Specific reviewers tagged
  • All comment threads resolved before merge

…SLSRE-1918)

Creating the aks-etcd-encryption key via bicep is a control-plane keys/write,
so the deployment identity needs a Key Vault role granting it. On a fresh region
buildout that role assignment can lag propagation and the cluster ARM step fails
with ForbiddenByRbac. Add that error code to the existing automatedRetry trigger
list on both the svc and mgmt cluster steps so the step retries once the grant
lands.

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

This PR updates the EV2/templatized infrastructure deployment pipelines to better tolerate transient Azure Key Vault RBAC propagation delays during fresh region buildouts. It does so by expanding the existing automated retry matchers for the cluster ARM deployment steps, allowing rollouts to self-heal once the Key Vault role assignment becomes effective.

Changes:

  • Add ForbiddenByRbac to automatedRetry.errorContainsAny for the cluster ARM step in the service-cluster pipeline (svc-pipeline.yaml).
  • Add ForbiddenByRbac to automatedRetry.errorContainsAny for the cluster ARM step in the management-cluster pipeline (mgmt-pipeline.yaml).
  • Document the rationale inline (Key Vault aks-etcd-encryption key creation can race RBAC propagation).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
dev-infrastructure/svc-pipeline.yaml Adds ForbiddenByRbac to the cluster ARM step retry matcher to handle transient Key Vault RBAC propagation lag.
dev-infrastructure/mgmt-pipeline.yaml Adds the same ForbiddenByRbac retry matcher to the mgmt cluster ARM step for parity and the same race condition.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mmazur

Copy link
Copy Markdown
Collaborator

/lgtm

@openshift-ci

openshift-ci Bot commented Aug 27, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mmazur, raelga

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@raelga

Copy link
Copy Markdown
Collaborator Author

/retest

@raelga

Copy link
Copy Markdown
Collaborator Author

/test e2e-parallel

Retesting: cluster-candidate-5-0 provisioning failed with:

InternalServerError: [hypershiftHostedCluster] hosted cluster has no installed version; hosted cluster degraded: UnavailableReplicas: router deployment has 1 unavailable replicas

Same exact signature also just hit #6706 (unrelated docs/cleanup-sweeper PR) in the same time window, confirming this is a shared-CI data-plane provisioning episode, not caused by this PR's ARM-retry diff.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD f9b2c34 and 2 for PR HEAD abc2be2 in total

@raelga

Copy link
Copy Markdown
Collaborator Author

/retest

@raelga

Copy link
Copy Markdown
Collaborator Author

/test e2e-parallel

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 6a34644 and 1 for PR HEAD abc2be2 in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 7fef8c4 and 0 for PR HEAD abc2be2 in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/hold

Revision abc2be2 was retested 3 times: holding

@raelga

Copy link
Copy Markdown
Collaborator Author

/unhold

@raelga

Copy link
Copy Markdown
Collaborator Author

/retest

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD a4e75fc and 2 for PR HEAD abc2be2 in total

@openshift-merge-bot
openshift-merge-bot Bot merged commit f2aec59 into Azure:main Aug 29, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants