OSAC-779, OSAC-780: fix PublicIP feedback controller and detach annotation - #236
Conversation
The feedback controller's handleDelete() was setting RELEASING when a PublicIP CR was being deleted. RELEASING is for the detach flow (ATTACHED -> RELEASING -> ALLOCATED), not for resource deletion. The fulfillment-service state machine rejected ALLOCATED -> RELEASING, leaving the CR stuck in Deleting phase. Now handleDelete() sets DELETING, matching the pattern used by the Subnet feedback controller. The detach flow through syncState() continues to use RELEASING unchanged. Bumps private-api BSR module from v0.0.60 to v0.0.61 which adds the PUBLIC_IP_STATE_DELETING enum value. Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com> Assisted-by: Cursor/Claude Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com>
📝 WalkthroughWalkthroughBumps private-api proto input to v0.0.61, changes feedback delete mapping to set public IP status to PUBLIC_IP_STATE_DELETING for non-Failed deletions, narrows when the publicip-target-namespace annotation is cleared (only when status == Allocated), and updates tests accordingly. ChangesPublic IP Deletion & Annotation Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
The annotation sync in syncComputeInstanceTargetNamespaceAnnotation() runs before the state transition from ATTACHED to RELEASING in handleUpdate(). The OSAC-776 preservation check tested for state == RELEASING, but the state was still ATTACHED at that point, so the annotation was always deleted before the AAP detach job could use it. Changed the condition from "preserve only during RELEASING" to "only clean up when ALLOCATED" (detach fully completed). This ensures the annotation survives the entire detach flow regardless of reconciliation ordering. Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com> Assisted-by: Cursor/Claude Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com>
|
@akshaynadkarni: This pull request references OSAC-779 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@akshaynadkarni: This pull request references OSAC-779 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set. This pull request references OSAC-780 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/retest-required |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: akshaynadkarni, DakCrowder, SiddarthR56 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 |
|
/override ci/prow/e2e-metal-vmaas-compute-instance-api-fields |
|
@akshaynadkarni: Overrode contexts on behalf of akshaynadkarni: ci/prow/e2e-metal-vmaas-compute-instance-api-fields DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@akshaynadkarni: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
Two fixes for the PublicIP delete and detach flows:
OSAC-779: Feedback controller uses DELETING (not RELEASING) when a PublicIP CR
is being deleted. Bumps private-api BSR module to v0.0.61.
OSAC-780: Target-namespace annotation is only cleared when state is ALLOCATED
(detach completed), not when state is ATTACHED (about to detach). The previous check
(
state != Releasing) failed because the annotation sync runs before the statetransitions to RELEASING in the same reconcile loop.
Why
OSAC-779: The feedback controller set RELEASING for all deletions, but RELEASING is the
detach flow (ATTACHED -> RELEASING -> ALLOCATED). The fulfillment-service state machine
rejected ALLOCATED -> RELEASING, leaving the CR stuck in Deleting phase.
OSAC-780: The
syncComputeInstanceTargetNamespaceAnnotation()function runs before thestate transition in
handleUpdate(). Whenspec.computeInstanceis cleared (detach trigger),the annotation was deleted while state was still ATTACHED (not yet RELEASING), so the
OSAC-776 preservation check never triggered. The AAP detach job then failed because the
annotation was missing.
Testing
E2E verified on edge22: full lifecycle (create pool, create IP, attach, detach, delete)
completed successfully with both fixes applied.
Related PRs
PUBLIC_IP_STATE_DELETINGto proto enumspec.computeInstanceTickets
Signed-off-by: akshaynadkarni 25892229+akshaynadkarni@users.noreply.github.com
Assisted-by: Cursor/Claude