Skip to content

OCPBUGS-121959: Make NIC persistence unconditional instead of version-specific - #6516

Open
dkhater-redhat wants to merge 1 commit into
openshift:mainfrom
dkhater-redhat:unconditional-nic-persistence
Open

OCPBUGS-121959: Make NIC persistence unconditional instead of version-specific#6516
dkhater-redhat wants to merge 1 commit into
openshift:mainfrom
dkhater-redhat:unconditional-nic-persistence

Conversation

@dkhater-redhat

Copy link
Copy Markdown
Contributor

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 #5406:
#5406 (comment)

Related:

  • OCPBUGS-10787: RHEL 8→9 NIC naming transition
  • OCPBUGS-63593: RHEL 9→10 NIC naming transition

- What I did

- How to verify it

- Description for the changelog

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
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 8, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@dkhater-redhat: This pull request references Jira Issue OCPBUGS-121959, which is invalid:

  • expected the bug to target either version "5.1.0." or "openshift-5.1.0.", but it targets "4.21.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

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 #5406:
#5406 (comment)

Related:

  • OCPBUGS-10787: RHEL 8→9 NIC naming transition
  • OCPBUGS-63593: RHEL 9→10 NIC naming transition

- What I did

- How to verify it

- Description for the changelog

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.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 3ba37f95-27e0-46c6-8903-d15bd853919b

📥 Commits

Reviewing files that changed from the base of the PR and between 95ada47 and c911422.

📒 Files selected for processing (1)
  • pkg/daemon/daemon.go

Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 8, 2026

@isabella-janssen isabella-janssen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 8, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn
/test e2e-aws-ovn-upgrade
/test e2e-gcp-op-ocl-part1
/test e2e-gcp-op-ocl-part2
/test e2e-gcp-op-part1
/test e2e-gcp-op-part2
/test e2e-gcp-op-single-node
/test e2e-hypershift
/test tls-pqc-readiness

@openshift-ci

openshift-ci Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [dkhater-redhat,isabella-janssen]

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

@openshift-ci

openshift-ci Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

@dkhater-redhat: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/perfscale-control-plane-6nodes c911422 link false /test perfscale-control-plane-6nodes
ci/prow/e2e-aws-ovn c911422 link true /test e2e-aws-ovn
ci/prow/e2e-hypershift c911422 link true /test e2e-hypershift

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants