Skip to content

telco5g: Detect and set SRIOV enabled interfaces for tests#79372

Closed
sshnaidm wants to merge 1 commit into
openshift:mainfrom
sshnaidm:telcosriovenabled
Closed

telco5g: Detect and set SRIOV enabled interfaces for tests#79372
sshnaidm wants to merge 1 commit into
openshift:mainfrom
sshnaidm:telcosriovenabled

Conversation

@sshnaidm
Copy link
Copy Markdown
Contributor

@sshnaidm sshnaidm commented May 17, 2026

This PR updates the telco5g CNF test step in the openshift/release CI to automatically discover and set SR-IOV-capable interfaces on test nodes so e2e tests only target compatible devices.

What changed (practical impact)

  • The telco5g CNF test command script (ci-operator/step-registry/telco5g/cnf/tests/telco5g-cnf-tests-commands.sh) now runs a pre-test discovery on each test node using oc debug to inspect host paths (/sys/class/net/*/device/sriov_totalvfs).
  • Interfaces with sriov_totalvfs > 0 are collected and formatted as "node:interface" entries, joined with pipe (|) delimiters.
  • When any SR-IOV-capable interfaces are found, the script exports SRIOV_NODE_AND_DEVICE_NAME_FILTER with that value so downstream e2e tests are constrained to those node:device pairs.
  • If discovery fails or finds no interfaces the script logs a warning and continues without setting the filter (tests remain runnable on environments without SR-IOV hardware).

Why this matters for CI

  • Makes telco5g CNF CI jobs in openshift/release hardware-aware and adaptive: tests automatically target available SR-IOV devices without static configuration changes.
  • Reduces false negatives and manual configuration when running CNF SR-IOV tests across heterogeneous or dynamic lab/hardware environments.

Exports/Side-effects

  • Conditionally exports SRIOV_NODE_AND_DEVICE_NAME_FILTER when SR-IOV-capable interfaces are detected.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 46c55535-48f9-46cf-bd21-94a3ca802c24

📥 Commits

Reviewing files that changed from the base of the PR and between 3adfb04 and 3ba6ad3.

📒 Files selected for processing (1)
  • ci-operator/step-registry/telco5g/cnf/tests/telco5g-cnf-tests-commands.sh

Walkthrough

Adds a pre-test SR-IOV interface discovery step that runs oc debug on each test node, reads /sys/class/net/*/device/sriov_totalvfs from the host filesystem to find interfaces with sriov_totalvfs > 0, and conditionally exports a pipe-separated SRIOV_NODE_AND_DEVICE_NAME_FILTER of node:interface entries.

Changes

SR-IOV Device Discovery and Filter Export

Layer / File(s) Summary
SR-IOV node interface discovery and filter export
ci-operator/step-registry/telco5g/cnf/tests/telco5g-cnf-tests-commands.sh
Iterates test_nodes, uses oc debug to read host /sys/class/net/*/device/sriov_totalvfs, collects node:interface pairs where sriov_totalvfs > 0, joins them with `

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels: rehearsals-ack

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'telco5g: Detect and set SRIOV enabled interfaces for tests' accurately summarizes the main change: adding SR-IOV interface detection logic to set a filter variable for e2e tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR modifies only a shell script for SR-IOV discovery setup, not Ginkgo test files. No Ginkgo test definitions with dynamic names are introduced.
Test Structure And Quality ✅ Passed This PR modifies a bash shell script, not Ginkgo test code. The custom check for Ginkgo test quality is not applicable.
Microshift Test Compatibility ✅ Passed PR does not add Ginkgo e2e tests. Only modifies shell script for SR-IOV interface discovery and environment setup. Custom check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR does not add new Ginkgo e2e tests. The file is a bash CI orchestration script that discovers SR-IOV interfaces. The custom check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR adds a CI test shell script that discovers SR-IOV interfaces. Not a deployment manifest or operator code - does not introduce scheduling constraints. Check not applicable.
Ote Binary Stdout Contract ✅ Passed PR modifies bash script, not Go OTE binary. Custom check applies only to Go-based OTE binaries with JSON stdout. Shell echo statements don't violate this contract.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests are added. The PR modifies a bash shell script to add SR-IOV interface discovery. Check only applies to PRs adding new Ginkgo tests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 17, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sshnaidm

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:

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 17, 2026
@openshift-ci openshift-ci Bot requested review from petr-muller and stbenjam May 17, 2026 10:43
@sshnaidm
Copy link
Copy Markdown
Contributor Author

/retest-required

@sshnaidm
Copy link
Copy Markdown
Contributor Author

/pj-rehearse periodic-ci-openshift-release-main-nightly-5.0-e2e-telco5g-cnftests periodic-ci-openshift-release-main-nightly-4.22-e2e-telco5g-cnftests periodic-ci-openshift-release-main-nightly-4.23-e2e-telco5g-cnftests

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

@sshnaidm: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@sshnaidm sshnaidm force-pushed the telcosriovenabled branch from 3adfb04 to 3ba6ad3 Compare May 17, 2026 19:22
@sshnaidm
Copy link
Copy Markdown
Contributor Author

/pj-rehearse periodic-ci-openshift-release-main-nightly-5.0-e2e-telco5g-cnftests periodic-ci-openshift-release-main-nightly-4.22-e2e-telco5g-cnftests periodic-ci-openshift-release-main-nightly-4.23-e2e-telco5g-cnftests

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

@sshnaidm: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@sshnaidm: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-kni-cnf-features-deploy-master-e2e-telco5g-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.22-e2e-telco5g-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.21-e2e-telco5g-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.20-e2e-telco5g-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.19-e2e-telco5g-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.18-e2e-telco5g-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.17-e2e-telco5g-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.16-e2e-telco5g-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.15-e2e-telco5g-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.14-e2e-telco5g-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-master-e2e-telco5g-hcp-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.22-e2e-telco5g-hcp-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.21-e2e-telco5g-hcp-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.20-e2e-telco5g-hcp-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.19-e2e-telco5g-hcp-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.18-e2e-telco5g-hcp-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.17-e2e-telco5g-hcp-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.16-e2e-telco5g-hcp-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-kni-cnf-features-deploy-release-4.19-e2e-telco5g-sno-cnftests openshift-kni/cnf-features-deploy presubmit Registry content changed
pull-ci-openshift-sriov-network-operator-main-e2e-telco5g-sriov-sno openshift/sriov-network-operator presubmit Registry content changed
pull-ci-openshift-sriov-network-operator-release-5.1-e2e-telco5g-sriov-sno openshift/sriov-network-operator presubmit Registry content changed
pull-ci-openshift-sriov-network-operator-release-5.0-e2e-telco5g-sriov-sno openshift/sriov-network-operator presubmit Registry content changed
pull-ci-openshift-sriov-network-operator-release-4.23-e2e-telco5g-sriov-sno openshift/sriov-network-operator presubmit Registry content changed
pull-ci-openshift-sriov-network-operator-release-4.22-e2e-telco5g-sriov-sno openshift/sriov-network-operator presubmit Registry content changed
pull-ci-openshift-sriov-network-operator-release-4.21-e2e-telco5g-sriov-sno openshift/sriov-network-operator presubmit Registry content changed

A total of 57 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs.

A full list of affected jobs can be found here

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 18, 2026

@sshnaidm: 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/rehearse/periodic-ci-openshift-release-main-nightly-5.0-e2e-telco5g-cnftests 3ba6ad3 link unknown /pj-rehearse periodic-ci-openshift-release-main-nightly-5.0-e2e-telco5g-cnftests
ci/rehearse/periodic-ci-openshift-release-main-nightly-4.23-e2e-telco5g-cnftests 3ba6ad3 link unknown /pj-rehearse periodic-ci-openshift-release-main-nightly-4.23-e2e-telco5g-cnftests
ci/rehearse/periodic-ci-openshift-release-main-nightly-4.22-e2e-telco5g-cnftests 3ba6ad3 link unknown /pj-rehearse periodic-ci-openshift-release-main-nightly-4.22-e2e-telco5g-cnftests

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.

@sshnaidm sshnaidm closed this May 18, 2026
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant