Skip to content

test: exclude NTO debug pods from best-effort QoS invariant - #31472

Draft
not-stbenjam wants to merge 1 commit into
openshift:mainfrom
not-stbenjam:agent/qos-nto-debug-pods
Draft

test: exclude NTO debug pods from best-effort QoS invariant#31472
not-stbenjam wants to merge 1 commit into
openshift:mainfrom
not-stbenjam:agent/qos-nto-debug-pods

Conversation

@not-stbenjam

@not-stbenjam not-stbenjam commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Follow-up to OCPBUGS-99916 and #31437.

Problem

The control-plane QoS invariant can race with transient oc debug pods in openshift-cluster-node-tuning-operator. These pods are best-effort by design, but the invariant currently recognizes equivalent pods only in openshift-machine-config-operator and transient openshift-debug-* namespaces.

Two OpenShift 5.0 runs show the same sequence:

In both runs, an NTO test created and started an oc debug pod immediately before the QoS assertion. The assertion reported that pod. The NTO test then deleted it, and the QoS retry passed.

Fix

This change adds openshift-cluster-node-tuning-operator to the explicit list of namespaces that can contain known transient debug pods.

The exclusion still requires the existing isEphemeralDebugPod predicate. It does not exclude all NTO pods. It does not add a global -debug- name exclusion.

The new table test covers:

  • Existing MCO debug pods.
  • NTO debug pods.
  • Transient openshift-debug-* pods.
  • An ordinary NTO pod.
  • A debug-named pod in an unrelated namespace.
  • An ordinary pod in a transient debug namespace.

Validation

CGO_ENABLED=0 go test -p 2 -vet=off ./test/extended/operators -run '^TestIsKnownEphemeralDebugPod$' -count=1
ok github.com/openshift/origin/test/extended/operators 0.079s

The test used workspace-local temporary and cache paths. An independent review found no blocking issue.

Generated-by: AI (analysis and patch). A human must verify this change before merge.

Summary by CodeRabbit

  • Bug Fixes

    • Improved identification of temporary debug pods across supported debug namespaces.
    • Prevented ordinary pods from being incorrectly classified as ephemeral debug pods.
  • Tests

    • Added coverage for recognized debug pods and non-debug pods across multiple namespace patterns.

Signed-off-by: Stephen Benjamin <stbenjam+ai@redhat.com>
@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: automatic mode

@openshift-ci openshift-ci Bot added ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Aug 1, 2026
@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 Aug 1, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@not-stbenjam: This pull request references Jira Issue OCPBUGS-99916, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is ON_QA 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:

Follow-up to OCPBUGS-99916 and #31437.

Problem

The control-plane QoS invariant can race with transient oc debug pods in openshift-cluster-node-tuning-operator. These pods are best-effort by design, but the invariant currently recognizes equivalent pods only in openshift-machine-config-operator and transient openshift-debug-* namespaces.

Two OpenShift 5.0 runs show the same sequence:

In both runs, an NTO test created and started an oc debug pod immediately before the QoS assertion. The assertion reported that pod. The NTO test then deleted it, and the QoS retry passed.

Fix

This change adds openshift-cluster-node-tuning-operator to the explicit list of namespaces that can contain known transient debug pods.

The exclusion still requires the existing isEphemeralDebugPod predicate. It does not exclude all NTO pods. It does not add a global -debug- name exclusion.

The new table test covers:

  • Existing MCO debug pods.
  • NTO debug pods.
  • Transient openshift-debug-* pods.
  • An ordinary NTO pod.
  • A debug-named pod in an unrelated namespace.
  • An ordinary pod in a transient debug namespace.

Validation

CGO_ENABLED=0 go test -p 2 -vet=off ./test/extended/operators -run '^TestIsKnownEphemeralDebugPod$' -count=1
ok github.com/openshift/origin/test/extended/operators 0.079s

The test used workspace-local temporary and cache paths. An independent review found no blocking issue.

Generated-by: AI (analysis and patch). A human must verify this change before merge.

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.

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 1, 2026
@openshift-ci

openshift-ci Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Hi @not-stbenjam. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@openshift-ci

openshift-ci Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: not-stbenjam
Once this PR has been reviewed and has the lgtm label, please assign sdodson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Walkthrough

The QoS test now uses centralized detection for ephemeral debug pods. The detection covers known debug namespaces and transient openshift-debug-* namespaces. Table-driven tests cover matching and non-matching pods.

Changes

QoS debug pod filtering

Layer / File(s) Summary
Known ephemeral debug pod detection
test/extended/operators/qos.go, test/extended/operators/qos_test.go
The QoS test recognizes ephemeral debug pods in the node debug namespace, node tuning operator namespace, and transient openshift-debug-* namespaces. Table-driven tests cover recognized debug pods and ordinary pods.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
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 All Ginkgo titles and table-test names are static descriptive strings; generated pod suffixes occur only in test data, not test titles.
Test Structure And Quality ✅ Passed The table-driven unit test checks one predicate, creates no cluster resources, uses no waits, and reports function/actual/expected values; its structure matches nearby Go tests.
Microshift Test Compatibility ✅ Passed The PR adds a standard Go unit test, not a new Ginkgo e2e test. The existing Ginkgo test uses only CoreV1 Pods and adds no unavailable MicroShift API or unsupported assumption.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR adds a standard Go table-driven test (TestIsKnownEphemeralDebugPod), not a new Ginkgo e2e test. No SNO compatibility check is required.
Topology-Aware Scheduling Compatibility ✅ Passed The commit changes only QoS test logic and unit tests; it adds no deployments, controllers, replicas, affinities, topology constraints, selectors, tolerations, or PDBs.
Ote Binary Stdout Contract ✅ Passed The PR adds only a namespace constant, predicate, and table-driven test; it adds no stdout or logging writes in process-level code. Existing main writes warnings and errors to stderr.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR adds a standard Go table test, not a new Ginkgo e2e test. The changed code has no IPv4 literals, IP parsing, URL construction, or external connectivity.
No-Weak-Crypto ✅ Passed The pull request only changes pod namespace and debug-pod matching logic plus tests; it adds no cryptography, weak algorithms, ECB mode, or secret comparisons.
Container-Privileges ✅ Passed The PR changes only Go logic and unit tests; no container or Kubernetes manifests or security settings were added or modified.
No-Sensitive-Data-In-Logs ✅ Passed The diff adds no sensitive-data logging; the only new log is a test failure with a boolean result, while production output remains namespace/pod QoS diagnostics.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: excluding node tuning operator debug pods from the best-effort QoS invariant.
✨ 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.

@not-stbenjam not-stbenjam changed the title OCPBUGS-99916: exclude NTO debug pods from best-effort QoS invariant test: exclude NTO debug pods from best-effort QoS invariant Aug 1, 2026
@openshift-ci-robot openshift-ci-robot removed 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 Aug 1, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@not-stbenjam: No Jira issue is referenced in the title of this pull request.
To reference a jira issue, add 'XYZ-NNN:' to the title of this pull request and request another refresh with /jira refresh.

Details

In response to this:

Follow-up to OCPBUGS-99916 and #31437.

Problem

The control-plane QoS invariant can race with transient oc debug pods in openshift-cluster-node-tuning-operator. These pods are best-effort by design, but the invariant currently recognizes equivalent pods only in openshift-machine-config-operator and transient openshift-debug-* namespaces.

Two OpenShift 5.0 runs show the same sequence:

In both runs, an NTO test created and started an oc debug pod immediately before the QoS assertion. The assertion reported that pod. The NTO test then deleted it, and the QoS retry passed.

Fix

This change adds openshift-cluster-node-tuning-operator to the explicit list of namespaces that can contain known transient debug pods.

The exclusion still requires the existing isEphemeralDebugPod predicate. It does not exclude all NTO pods. It does not add a global -debug- name exclusion.

The new table test covers:

  • Existing MCO debug pods.
  • NTO debug pods.
  • Transient openshift-debug-* pods.
  • An ordinary NTO pod.
  • A debug-named pod in an unrelated namespace.
  • An ordinary pod in a transient debug namespace.

Validation

CGO_ENABLED=0 go test -p 2 -vet=off ./test/extended/operators -run '^TestIsKnownEphemeralDebugPod$' -count=1
ok github.com/openshift/origin/test/extended/operators 0.079s

The test used workspace-local temporary and cache paths. An independent review found no blocking issue.

Generated-by: AI (analysis and patch). A human must verify this change before merge.

Summary by CodeRabbit

  • Bug Fixes

  • Improved identification of temporary debug pods across supported debug namespaces.

  • Prevented ordinary pods from being incorrectly classified as ephemeral debug pods.

  • Tests

  • Added coverage for recognized debug pods and non-debug pods across multiple namespace patterns.

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.

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

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants