OCPBUGS-121959: Make NIC persistence unconditional instead of version-specific - #6516
OCPBUGS-121959: Make NIC persistence unconditional instead of version-specific#6516dkhater-redhat wants to merge 1 commit into
Conversation
Simplify NIC persistence logic by removing version-specific conditionals and making it run unconditionally for all RHEL-like systems. Previously, the code treated each RHEL version transition (8→9, 9→10) as a special case, requiring code updates for each new RHEL release. This meant we would need to keep adding conditions like `|| hostos.IsEL10()`, `|| hostos.IsEL11()`, etc. Colin Walters correctly identified that what we're really doing is "freezing NIC names by default effectively" and suggested making this behavior unconditional rather than continually extending the conditional for each new RHEL release. Changes: - Remove version-specific `persisting` and `cleanup` logic - Persist NIC names unconditionally for all RHEL-like systems - Remove cleanup mode (RHEL10+) - persistence is now the default behavior - Simplify code by removing switch statements and special cases - Update documentation to reflect the new unconditional approach Benefits: - No code changes needed for future RHEL versions (11, 12, etc.) - Simpler, more maintainable code - Consistent behavior across all RHEL versions - Future-proof solution Addresses feedback from cgwalters on PR openshift#5406: openshift#5406 (comment) Related: - OCPBUGS-10787: RHEL 8→9 NIC naming transition - OCPBUGS-63593: RHEL 9→10 NIC naming transition
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@dkhater-redhat: This pull request references Jira Issue OCPBUGS-121959, which is invalid:
Comment 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. |
|
Warning Review limit reachedNext included review available in 51 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Review configuration: ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Comment |
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dkhater-redhat, isabella-janssen 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 |
|
@dkhater-redhat: 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. |
Simplify NIC persistence logic by removing version-specific conditionals and making it run unconditionally for all RHEL-like systems.
Previously, the code treated each RHEL version transition (8→9, 9→10) as a special case, requiring code updates for each new RHEL release. This meant we would need to keep adding conditions like
|| hostos.IsEL10(),|| hostos.IsEL11(), etc.Colin Walters correctly identified that what we're really doing is "freezing NIC names by default effectively" and suggested making this behavior unconditional rather than continually extending the conditional for each new RHEL release.
Changes:
persistingandcleanuplogicBenefits:
Addresses feedback from cgwalters on PR #5406:
#5406 (comment)
Related:
- What I did
- How to verify it
- Description for the changelog