Skip to content

NO-ISSUE: Use --wait=false for namespace deletion in RF teardowns - #7305

Closed
agullon wants to merge 1 commit into
openshift:mainfrom
agullon:NO-ISSUE-ns-wait-false
Closed

NO-ISSUE: Use --wait=false for namespace deletion in RF teardowns#7305
agullon wants to merge 1 commit into
openshift:mainfrom
agullon:NO-ISSUE-ns-wait-false

Conversation

@agullon

@agullon agullon commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Use --wait=false in the Remove Namespace RF keyword so oc delete namespace returns immediately instead of blocking until all finalizers are processed.

Root cause: On ARM with dual-stack, OVN reconciliation after a network config change (dual-stack → single-stack) saturates the CPU. When suite teardown fires oc delete namespace during this window, the namespace garbage collection — competing with OVN for CPU — exceeds the 5-minute RF process timeout in Run With Kubeconfig. The killed oc process returns rc=1, the Should Be Equal As Integers assertion fails, and all passing tests are retroactively marked as suite teardown failures.

Fix: --wait=false marks the namespace for deletion and returns immediately. The API server continues cleanup asynchronously. This is safe because:

  • All 13 callers of Remove Namespace use it in teardown contexts where no subsequent test depends on the namespace being fully gone
  • Test VMs are torn down after the suite completes, so any in-progress namespace deletion is irrelevant

Observed in: e2e-aws-tests-bootc-release-arm-el9, scenario el98-lrel@dual-stack-configuration1 — all 4 dual-stack tests passed but were retroactively marked failed due to suite teardown timeout.

Test plan

  • Verify no caller of Remove Namespace depends on synchronous namespace deletion
  • Confirm dual-stack suite teardown completes without timeout on ARM

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Namespace deletion now returns without waiting for the namespace removal process to complete.

The Remove Namespace keyword runs `oc delete namespace` during suite
teardowns, blocking until all resources and finalizers are processed.
On ARM with dual-stack, OVN reconciliation after a network config
change saturates the CPU, causing namespace garbage collection to
exceed the 5-minute RF process timeout. The killed `oc` returns rc=1,
which cascades as a suite teardown failure and retroactively marks
all passing tests as failed.

Using --wait=false marks the namespace for deletion and returns
immediately. The API server cleans up asynchronously, which is safe
because test VMs are torn down after the suite completes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
@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 the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 2, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@agullon: This pull request explicitly references no jira issue.

Details

In response to this:

Summary

  • Use --wait=false in the Remove Namespace RF keyword so oc delete namespace returns immediately instead of blocking until all finalizers are processed.

Root cause: On ARM with dual-stack, OVN reconciliation after a network config change (dual-stack → single-stack) saturates the CPU. When suite teardown fires oc delete namespace during this window, the namespace garbage collection — competing with OVN for CPU — exceeds the 5-minute RF process timeout in Run With Kubeconfig. The killed oc process returns rc=1, the Should Be Equal As Integers assertion fails, and all passing tests are retroactively marked as suite teardown failures.

Fix: --wait=false marks the namespace for deletion and returns immediately. The API server continues cleanup asynchronously. This is safe because:

  • All 13 callers of Remove Namespace use it in teardown contexts where no subsequent test depends on the namespace being fully gone
  • Test VMs are torn down after the suite completes, so any in-progress namespace deletion is irrelevant

Observed in: e2e-aws-tests-bootc-release-arm-el9, scenario el98-lrel@dual-stack-configuration1 — all 4 dual-stack tests passed but were retroactively marked failed due to suite teardown timeout.

Test plan

  • Verify no caller of Remove Namespace depends on synchronous namespace deletion
  • Confirm dual-stack suite teardown completes without timeout on ARM

🤖 Generated with Claude Code

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 2, 2026

Copy link
Copy Markdown
Contributor

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: fce2105a-d364-4085-8956-0910d82a3fa0

📥 Commits

Reviewing files that changed from the base of the PR and between b19f04d and 32e54a1.

📒 Files selected for processing (1)
  • test/resources/kubeconfig.resource

Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review.


Walkthrough

The namespace removal test command now deletes namespaces without waiting for deletion completion.

Changes

Namespace removal

Layer / File(s) Summary
Use asynchronous namespace deletion
test/resources/kubeconfig.resource
Remove Namespace now runs oc delete namespace ${ns} --wait=false.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 32e54

This localized teardown change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: using --wait=false for namespace deletion in Robot Framework teardowns.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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 PASS: The pull request changes only test/resources/kubeconfig.resource, replacing oc delete namespace ${ns} with oc delete namespace ${ns} --wait=false. It adds or changes no Ginkgo test title (…
Test Structure And Quality ✅ Passed PASS: This check is not applicable. The pull request changes only test/resources/kubeconfig.resource, a Robot Framework keyword, and the diff only adds --wait=false to oc delete namespace. It do…
Microshift Test Compatibility ✅ Passed PASS: The pull request changes only test/resources/kubeconfig.resource. The diff changes the existing Robot Framework Remove Namespace keyword from oc delete namespace ${ns} to `oc delete namesp…
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS: The pull request changes only test/resources/kubeconfig.resource, replacing the namespace deletion command with oc delete namespace ${ns} --wait=false. The commit adds no Go files or Ginkgo …
Topology-Aware Scheduling Compatibility ✅ Passed PASS — The pull request changes only test/resources/kubeconfig.resource. The exact diff replaces oc delete namespace ${ns} with oc delete namespace ${ns} --wait=false. It does not add or modify …
Ote Binary Stdout Contract ✅ Passed PASS: The pull request changes only the Robot Framework resource test/resources/kubeconfig.resource, adding --wait=false to an oc delete namespace command. It does not modify an OTE binary, proc…
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS — The pull request changes only test/resources/kubeconfig.resource, replacing namespace deletion with oc delete namespace ${ns} --wait=false. The diff adds no Ginkgo tests or networking code,…
No-Weak-Crypto ✅ Passed PASS. The PR changes only test/resources/kubeconfig.resource, adding --wait=false to oc delete namespace. The added line introduces no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom cryptograp…
Container-Privileges ✅ Passed PASS: The pull request changes only test/resources/kubeconfig.resource, replacing oc delete namespace ${ns} with oc delete namespace ${ns} --wait=false. The exact added line contains no containe…
No-Sensitive-Data-In-Logs ✅ Passed The PR changes only the Remove Namespace command from oc delete namespace ${ns} to oc delete namespace ${ns} --wait=false. It adds no logging, output capture, or sensitive data. The existing `Ru…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Full details: Stable And Deterministic Test Names

Explanation

PASS: The pull request changes only test/resources/kubeconfig.resource, replacing oc delete namespace ${ns} with oc delete namespace ${ns} --wait=false. It adds or changes no Ginkgo test title (It, Describe, Context, or When), so it introduces no unstable test names.

Full details: Test Structure And Quality

Explanation

PASS: This check is not applicable. The pull request changes only test/resources/kubeconfig.resource, a Robot Framework keyword, and the diff only adds --wait=false to oc delete namespace. It does not add or modify Ginkgo It blocks, setup/cleanup hooks, cluster waits, or assertions. The repository test tree is primarily Robot Framework (.robot and .resource files).

Full details: Microshift Test Compatibility

Explanation

PASS: The pull request changes only test/resources/kubeconfig.resource. The diff changes the existing Robot Framework Remove Namespace keyword from oc delete namespace ${ns} to oc delete namespace ${ns} --wait=false. It adds no Ginkgo e2e tests or It(), Describe(), Context(), or When() blocks. The MicroShift API compatibility check is therefore not applicable.

Full details: Single Node Openshift (Sno) Test Compatibility

Explanation

PASS: The pull request changes only test/resources/kubeconfig.resource, replacing the namespace deletion command with oc delete namespace ${ns} --wait=false. The commit adds no Go files or Ginkgo constructs such as It(), Describe(), Context(), or When(). Therefore, the SNO test-compatibility check is not applicable.

Full details: Topology-Aware Scheduling Compatibility

Explanation

PASS — The pull request changes only test/resources/kubeconfig.resource. The exact diff replaces oc delete namespace ${ns} with oc delete namespace ${ns} --wait=false. It does not add or modify deployment manifests, operator code, controllers, replicas, affinity, topology spread, selectors, tolerations, or PDBs. Therefore it introduces no topology-related scheduling constraint covered by this check.

Full details: Ote Binary Stdout Contract

Explanation

PASS: The pull request changes only the Robot Framework resource test/resources/kubeconfig.resource, adding --wait=false to an oc delete namespace command. It does not modify an OTE binary, process-level setup, or any stdout/logging code. The custom check is therefore not applicable.

Full details: Ipv6 And Disconnected Network Test Compatibility

Explanation

PASS — The pull request changes only test/resources/kubeconfig.resource, replacing namespace deletion with oc delete namespace ${ns} --wait=false. The diff adds no Ginkgo tests or networking code, so the IPv6 and disconnected-network check is not applicable.

Full details: No-Weak-Crypto

Explanation

PASS. The PR changes only test/resources/kubeconfig.resource, adding --wait=false to oc delete namespace. The added line introduces no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom cryptography, or secret/token comparison.

Full details: Container-Privileges

Explanation

PASS: The pull request changes only test/resources/kubeconfig.resource, replacing oc delete namespace ${ns} with oc delete namespace ${ns} --wait=false. The exact added line contains no container or Kubernetes privilege setting. No privileged: true, host namespace setting, SYS_ADMIN, root execution setting, or allowPrivilegeEscalation: true was introduced by the diff. Existing privilege-related entries elsewhere are unchanged and are not caused by this pull request.

Full details: No-Sensitive-Data-In-Logs

Explanation

The PR changes only the Remove Namespace command from oc delete namespace ${ns} to oc delete namespace ${ns} --wait=false. It adds no logging, output capture, or sensitive data. The existing Run With Kubeconfig stdout/stderr logging is unchanged, and ${ns} was already part of the command path.

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

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

@openshift-ci

openshift-ci Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: agullon

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 Sep 2, 2026
@openshift-ci

openshift-ci Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@agullon: all tests passed!

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.

@agullon

agullon commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Consolidated into #7326

@agullon agullon closed this Sep 4, 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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants