feat(slot-manager): validate identity pool recovery (AROSLSRE-1896) - #6705
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an operational recovery and validation procedure to the slot-manager design doc for cases where an E2E job fails because its leased managed-identity container resource group is missing.
Changes:
- Documents how identity pools are derived from
test/e2e-config/e2e-slots.yamland how slot/container naming is expanded. - Adds a supported reconciliation flow via
make -C test apply-identity-pool, including subscription scoping and deployment-stack behavior. - Adds read-only validation commands to confirm the full expected set of resource groups and user-assigned identities exist across the pool.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Suppressed comments (1)
test/cmd/aro-hcp-tests/slot-manager/identity-pool/validate_test.go:70
- With identities present in the unexpected resource group, the validator should report them as unexpected as well (in addition to the unexpected identity in the expected group).
if len(result.UnexpectedIdentities) != 1 || result.UnexpectedIdentities[0].Name != "unexpected" {
t.Fatalf("unexpected identities: %v", result.UnexpectedIdentities)
|
Validated the new read-only target against the restored DEV shard0 pool: make -C test validate-identity-pool \
ENVIRONMENT=dev \
SUBSCRIPTION="ARO HCP E2E Hosted Clusters (EA Subscription)"Output: The command completed successfully (exit status 0) and performed read-only Azure inventory checks. |
|
/lgtm |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Follow-up on recurrence risk: I confirmed the identity pool is currently exposed to the policy-driven cleanup path.
Based on the current |
AROSLSRE-1896
What
Adds a read-only
slot-manager validate-identity-poolcommand andvalidate-identity-poolMake target. The validator expands the canonical slotcatalog, bulk-lists Azure resource groups and user-assigned identities, and
reports missing or unexpected inventory with a non-zero exit code on drift.
Also documents the supported identity-pool reconciliation and validation
workflow in the slot-manager design.
Why
AROSLSRE-1895 found that
DEV shard0 had only 16 of its expected 300 identity-container resource groups.
The recovery target existed, but there was no maintained command for validating
the complete catalog-derived pool after reconciliation.
Testing
go test ./cmd/aro-hcp-tests/slot-manager/identity-pool ./cmd/aro-hcp-tests/slot-managermake lintmake -C test aro-hcp-tests./test/aro-hcp-tests slot-manager validate-identity-pool --helpgroups and all 3,900 expected managed identities, with zero drift.
git diff --checkSpecial notes for your reviewer
Validation comparisons are case-insensitive because Azure resource names are
case-insensitive and list APIs may return different casing. Pool-level prefixes
are used to detect resources belonging to removed slot indexes.
The apply documentation warns that deployment stacks delete resources and
resource groups that become unmanaged after a catalog change.
PR Checklist
If E2E tests are included:
demonstrate that the test is able to detect a defect/error and fail with
proper error message and logs which communicates nature of the problem. - not applicable