OCPBUGS-90536: openstack: Guard network resource names on os_net_id being defined#10639
OCPBUGS-90536: openstack: Guard network resource names on os_net_id being defined#10639stephenfin wants to merge 2 commits into
os_net_id being defined#10639Conversation
|
@stephenfin: This pull request explicitly references no jira issue. 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe PR adds a conditional guard for OpenStack network resource naming and adds floating IP cleanup to network teardown before router removal. ChangesOpenStack UPI Network Cleanup and Guards
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
os_net_id being defined
os_net_id being definedos_net_id being defined
|
@stephenfin: This pull request references Jira Issue OCPBUGS-90536, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. 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. |
|
/test e2e-openstack-dualstack-upi |
|
New changes are detected. LGTM label has been removed. |
|
@stephenfin: This pull request references Jira Issue OCPBUGS-90536, which is valid. 3 validation(s) were run on this bug
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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
The 'Compute network resource names' task in common.yaml uses the os_net_id variable, which is loaded from netid.json. Since commit 7b6b3f1 (OCPBUGS-39285), netid.json is loaded conditionally via include_vars (skipped when the file doesn't exist), but the task that consumes os_net_id had no corresponding guard. This causes the UPI deprovision playbook to fail with "'os_net_id' is undefined" when netid.json is not present in the working directory. Add a 'when: os_net_id is defined' guard, consistent with the existing 'when: sym.stat.exists' guard on the 'Compute resource names' task above. Note that the deprovision playbooks (e.g. down-network.yaml) do use these network resource names, but they already handle missing resources gracefully - they list resources by tag first and use 'state: absent' for deletion. Without os_net_id the names can't be computed at all, so skipping is the only safe option. More importantly, failing hard here prevents the entire deprovision run from cleaning up resources that *can* be cleaned up (servers, security groups, etc. that use infraID from metadata.json rather than os_net_id). Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
You cannot delete a router while it still has FIPs associated with it. Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
b487707 to
a211562
Compare
|
/test e2e-openstack-ovn |
|
Re-test because it looks like an infrastructure flake, not a code bug. |
|
/test e2e-openstack-dualstack-upi |
|
@stephenfin: The following tests 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. |
|
/hold Looks like my fix to remove the stale FIPs wasn't enough and there are still ports left over. I'm guessing something is creating a router, but I don't know what or why it's suddenly changed 😕 |
The
Compute network resource namestask in common.yaml uses theos_net_idvariable, which is loaded fromnetid.json. Since commit 7b6b3f1 (OCPBUGS-39285),netid.jsonis loaded conditionally viainclude_vars(skipped when the file doesn't exist), but the task that consumesos_net_idhad no corresponding guard. This causes the UPI deprovision playbook to fail with'os_net_id' is undefinedwhennetid.jsonis not present in the working directory.Add a
when: os_net_id is definedguard, consistent with the existingwhen: sym.stat.existsguard on theCompute resource namestask above.Note that the deprovision playbooks (e.g.
down-network.yaml) do use these network resource names, but they already handle missing resources gracefully - they list resources by tag first and usestate: absentfor deletion. Withoutos_net_idthe names can't be computed at all, so skipping is the only safe option. More importantly, failing hard here prevents the entire deprovision run from cleaning up resources that can be cleaned up (servers, security groups, etc. that useinfraIDfrommetadata.jsonrather thanos_net_id).Summary by CodeRabbit