Skip to content

OCPBUGS-99397: remove custom MCP and pause master pool in mirror-set tests to prevent PDB drain deadlock and suite timeout#31408

Open
Chandan9112 wants to merge 3 commits into
openshift:mainfrom
Chandan9112:fix/mirror-test-pdb-drain-deadlock
Open

OCPBUGS-99397: remove custom MCP and pause master pool in mirror-set tests to prevent PDB drain deadlock and suite timeout#31408
Chandan9112 wants to merge 3 commits into
openshift:mainfrom
Chandan9112:fix/mirror-test-pdb-drain-deadlock

Conversation

@Chandan9112

@Chandan9112 Chandan9112 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes PDB drain deadlock and suite timeout in [OCP-57401] and [OCP-70203] mirror-set tests on 2-worker clusters (vSphere, AWS 1of2 split).

Root Cause

The tests previously used a custom mirrorTestPool MCP for a single worker node. Since IDMS/ITMS/ICSP are cluster-scoped, creating them triggered rollouts on both the custom MCP and the main worker MCP simultaneously. On 2-worker clusters, MCO attempted to drain both workers at once, but PodDisruptionBudgets prevented pod rescheduling — causing a deadlock where neither node could drain and MCP rollouts stalled indefinitely.

Additionally, since IDMS/ITMS are cluster-scoped, they also trigger master pool rollouts. On clusters with 3 master nodes, draining masters sequentially during cleanup adds significant time (~15-20 min), causing the overall disruptive test suite to timeout.

Fix

  1. Remove custom MCP entirely — Tests now operate directly on the worker pool, eliminating the concurrent drain scenario that caused the PDB deadlock.

  2. Pause master pool during test execution — Since we only verify registries.conf on worker nodes, the master pool drain is unnecessary for test validation. Pausing the master at test start and unpausing in DeferCleanup prevents master drains from contributing to suite timeout.

  3. Use worker-only waits in test body — Test steps use waitForWorkerRollout (calls imagepolicy.WaitForMCPConfigSpecChangeAndUpdated) to wait only for the worker pool during verification steps, reducing blocking time.

  4. Use parallel pool waits in cleanup — Cleanup uses waitForPoolsRollout (calls imagepolicy.WaitForMCPsConfigSpecChangeAndUpdated) to wait for both worker and master pools in parallel, ensuring cluster stability before the next test.

Changes

  • Removed mirrorTestPool struct, methods, and all custom MCP lifecycle code
  • Added pauseMasterPool / unpauseMasterPool helpers
  • Added getWorkerMCPSpec / waitForWorkerRollout / waitForPoolsRollout / readRegistriesConfOnWorker helpers
  • Both OCP-57401 and OCP-70203 tests updated to use new approach

Testing

  Running Suite:  - /Users/cmaurya/go/src/github.com/openshift/origin
  ===================================================================
  Random Seed: 1784946045 - will randomize all specs

  Will run 1 of 1 specs
  ------------------------------
  [sig-node][Suite:openshift/disruptive-longrunning][Disruptive][Serial] ImageTagMirrorSet and ImageDigestMirrorSet [OTP] Create ImageDigestMirrorSet and ImageTagMirrorSet and verify registries.conf [OCP-57401]
  github.com/openshift/origin/test/extended/node/node_e2e/image_mirror_set.go:91
    STEP: Creating a kubernetes client @ 07/25/26 07:50:50.968
  I0725 07:50:50.969803   52889 discovery.go:214] Invalidating discovery information
  I0725 07:50:50.970646 52889 framework.go:2330] [precondition-check] checking if cluster is MicroShift
  I0725 07:50:51.284708 52889 framework.go:2353] IsMicroShiftCluster: microshift-version configmap not found, not MicroShift
    STEP: Pause master pool to avoid master drains during test @ 07/25/26 07:50:51.613
  machineconfigpool.machineconfiguration.openshift.io/master patched
  I0725 07:50:57.528691 52889 image_mirror_set.go:45] Master pool paused
    STEP: Step 1: Create an ImageDigestMirrorSet @ 07/25/26 07:50:57.863
  I0725 07:50:58.195755 52889 image_mirror_set.go:129] ImageDigestMirrorSet "digest-mirror-spcnk" created successfully
    STEP: Step 2: Wait for worker MCP rollout and verify IDMS entries in registries.conf @ 07/25/26 07:50:58.195
  I0725 07:50:58.195946 52889 imagepolicy.go:689] Waiting for pool worker to complete
  I0725 07:51:51.154750 52889 image_mirror_set.go:152] Worker MCP rollout complete after IDMS creation
  I0725 07:52:11.410017 52889 image_mirror_set.go:155] registries.conf after IDMS: read 668 bytes
    STEP: Step 3: Create an ImageTagMirrorSet @ 07/25/26 07:52:11.41
  I0725 07:52:12.348925 52889 image_mirror_set.go:196] ImageTagMirrorSet "tag-mirror-spcnk" created successfully
    STEP: Step 4: Wait for worker MCP rollout and verify ITMS entries alongside IDMS @ 07/25/26 07:52:12.349
  I0725 07:52:12.349152 52889 imagepolicy.go:689] Waiting for pool worker to complete
  I0725 07:55:09.269053 52889 image_mirror_set.go:200] Worker MCP rollout complete after ITMS creation
  I0725 07:55:14.606981 52889 image_mirror_set.go:203] registries.conf after ITMS: read 1177 bytes
    STEP: Cleanup: Delete IDMS and ITMS resources @ 07/25/26 07:55:14.609
  I0725 07:55:15.798240 52889 imagepolicy.go:689] Waiting for pool worker to complete
  machineconfigpool.machineconfiguration.openshift.io/master patched
  I0725 07:58:22.724754 52889 image_mirror_set.go:54] Master pool unpaused
  • [451.773 seconds]
  ------------------------------

  Ran 1 of 1 Specs in 451.773 seconds
  SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Bug Reference

https://redhat.atlassian.net/browse/OCPBUGS-99397

@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 the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 22, 2026
@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Chandan9112
Once this PR has been reviewed and has the lgtm label, please assign cpmeadors 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 Jul 22, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The image mirror end-to-end tests now use the cluster-scoped worker and master MachineConfigPools for rollout and stability tracking, and validate mirror configuration changes by reading registries.conf from ready worker nodes.

Changes

Image mirror validation

Layer / File(s) Summary
Cluster MCP tracking helpers
test/extended/node/node_e2e/image_mirror_set.go
Replaces the custom mirror-test pool with helpers that read MCP configuration names, wait for worker and master rollout, read worker registries.conf, and detect unchanged specs.
IDMS and ITMS rollout assertions
test/extended/node/node_e2e/image_mirror_set.go
Tracks MCP baselines and rollout, then validates digest-only, tag-only, blocked, and retained registry entries during creation and cleanup.
ICSP coexistence lifecycle
test/extended/node/node_e2e/image_mirror_set.go
Verifies MCP stability and registries.conf contents across ICSP, IDMS, and ITMS creation and deletion.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: mrunalp, asahay19


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 2 warnings)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error New assertion logs the worker node name on read failure; node names can expose internal hostnames. Remove the node name from the log/error text or redact it, e.g. use a generic failure message without interpolating nodeName.
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ⚠️ Warning The title matches the MCP cleanup goal, but it incorrectly mentions pausing the master pool, which is not reflected in the changes. Retitle it to describe the actual change, e.g. removing the custom MCP and validating mirror-set tests directly against worker/master pools.
✅ Passed checks (12 passed)
Check name Status Explanation
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 in the changed file are static string literals; no dynamic values, concatenation, or unstable identifiers appear in test names.
Test Structure And Quality ✅ Passed Both tests use bounded waits, explicit DeferCleanup cleanup, and diagnostic Expect messages; no unbounded Eventually/Consistently calls were found.
Microshift Test Compatibility ✅ Passed PASS: both Ginkgo tests are guarded by nodeutils.SkipOnMicroShift in BeforeEach, which checks exutil.IsMicroShiftCluster and g.Skip().
Single Node Openshift (Sno) Test Compatibility ✅ Passed The tests only verify MCP/registries.conf state on one ready worker node; they don’t require multiple nodes, pod rescheduling, or other HA-only behavior.
Topology-Aware Scheduling Compatibility ✅ Passed Only a node e2e test file changed; it adds no pod scheduling constraints, affinity, replicas, or node selectors, just MCP waits and worker-node reads.
Ote Binary Stdout Contract ✅ Passed The only changed file adds helpers and in-test e2e.Logf calls; no main/init/TestMain/BeforeSuite stdout writes or fmt.Print/log-to-stdout issues appear.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No IPv4-only literals or IP parsing/URL construction found; the test only updates cluster configs and reads node files, with no external network calls.
No-Weak-Crypto ✅ Passed Changed file is a mirror-set test refactor only; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret/token comparisons found.
Container-Privileges ✅ Passed Only a Go e2e test file changed; no container/K8s manifests or privilege settings (privileged, hostPID/Network/IPC, allowPrivilegeEscalation, SYS_ADMIN, runAsUser:0) were added.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
test/extended/node/node_e2e/image_mirror_set.go (1)

135-136: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Use a bounded, detached cleanup context instead of context.Background().

Both cleanup paths discard Ginkgo context values; the new unpause PATCH also has no explicit deadline. Thread the cleanup context into teardown and derive bounded contexts with context.WithoutCancel(ctx).

  • test/extended/node/node_e2e/image_mirror_set.go#L135-L136: use the detached, timeout-bounded context for unpauseWorkerMCP.
  • test/extended/node/node_e2e/image_mirror_set.go#L279-L279: derive cleanupCtx from the existing spec context rather than context.Background().

Based on learnings, deferred cleanup should preserve context values with context.WithoutCancel(ctx) and then apply an explicit timeout. As per path instructions, Go API calls must remain cancellation/timeout bounded.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/extended/node/node_e2e/image_mirror_set.go` around lines 135 - 136, The
cleanup flow in test/extended/node/node_e2e/image_mirror_set.go must use a
detached, timeout-bounded context for both cleanup paths: at lines 135-136, pass
the derived cleanup context to unpauseWorkerMCP; at line 279, derive cleanupCtx
from the existing spec context with context.WithoutCancel(ctx) and apply an
explicit timeout instead of using context.Background().

Sources: Path instructions, Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/extended/node/node_e2e/image_mirror_set.go`:
- Around line 117-123: Update mirrorTestPool.unpauseWorkerMCP to retry the
worker MCP patch and verify that the resulting MachineConfigPool has
spec.paused=false. If restoration still fails, record a cleanup failure and
prevent teardown from continuing in a way that could leave the cluster-scoped
worker MCP paused; retain the success log only after verification passes.

---

Nitpick comments:
In `@test/extended/node/node_e2e/image_mirror_set.go`:
- Around line 135-136: The cleanup flow in
test/extended/node/node_e2e/image_mirror_set.go must use a detached,
timeout-bounded context for both cleanup paths: at lines 135-136, pass the
derived cleanup context to unpauseWorkerMCP; at line 279, derive cleanupCtx from
the existing spec context with context.WithoutCancel(ctx) and apply an explicit
timeout instead of using context.Background().
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 1b5e0a66-a84d-4a2e-b23e-fad269433ea5

📥 Commits

Reviewing files that changed from the base of the PR and between c367745 and 0b62ca0.

📒 Files selected for processing (1)
  • test/extended/node/node_e2e/image_mirror_set.go

Comment thread test/extended/node/node_e2e/image_mirror_set.go Outdated
@Chandan9112 Chandan9112 changed the title fix: pause worker MCP during mirror-set tests to prevent PDB drain deadlock Bug OCPBUGS-99397: pause worker MCP during mirror-set tests to prevent PDB drain deadlock Jul 22, 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 Jul 22, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@Chandan9112: This pull request references Jira Issue OCPBUGS-99397, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

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:

Bug

On 2-worker clusters (vSphere CI, AWS 1of2 splits), the [OCP-57401] and [OCP-70203] mirror-set tests cause a PDB drain deadlock during MCP rollouts. The vsphere-disruptive-longrunning-techpreview job has been consistently failing since 07/08/2026 when PR #31229 introduced the [OCP-57401] test.

Root Cause

The tests create cluster-scoped IDMS/ITMS/ICSP resources which trigger a MachineConfig update on all pools simultaneously. Since mirrorTestPool moves one worker into a custom MCP, only one worker remains in the worker pool. When both pools drain their nodes at the same time, PDB-protected pods (router, prometheus, ingress) have zero available nodes to reschedule onto — causing a drain deadlock. The worker MCP gets stuck in Updating state, cleanup times out, and subsequent tests fail on a degraded cluster.

Fix

Pause the worker MCP when creating the custom mirror test pool, and unpause it at the start of Teardown() before the node transitions back. This ensures only the custom pool node is drained during the test while the other worker remains available for PDB-protected pod scheduling.

Changes (+24 lines, -2 lines):

  • Add pauseWorkerMCP() / unpauseWorkerMCP() helper methods on mirrorTestPool
  • Call pauseWorkerMCP in newMirrorTestPool() after pool is ready
  • Call unpauseWorkerMCP at start of Teardown() before node label removal
  • Bump timeout from 10m to 15m to account for worker processing pending changes after unpause

Test Results

Tested on vSphere TechPreview cluster with 2 workers:

SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Paused worker MCP to prevent PDB drain deadlock
IDMS MCP rollout complete on custom pool mirror-test-f6cw9
Custom MCP mirror-test-f6cw9 finished rolling out after ITMS creation
Cleanup: Delete IDMS and ITMS resources
Unpaused worker MCP
Teardown: waiting for node to transition back to worker pool
Teardown: waiting for worker MCP to stabilize
MachineConfigPool worker is ready: 2/2 machines ready

Post-test cluster state — all MCPs healthy:

NAME     UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT
master   True      False      False      3              3
worker   True      False      False      2              2

All nodes Ready, no SchedulingDisabled:

ci-ln-t5dnqcb-c1627-9bmwz-worker-0-hkv84   Ready    worker
ci-ln-t5dnqcb-c1627-9bmwz-worker-0-hl9bd   Ready    worker

Summary by CodeRabbit

  • Bug Fixes
  • Improved mirror-set end-to-end test reliability on clusters with two workers by preventing drain deadlocks.
  • Ensured worker configuration is restored during cleanup.
  • Increased stabilization and cleanup timeouts to accommodate slower cluster operations.

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.

@Chandan9112 Chandan9112 changed the title Bug OCPBUGS-99397: pause worker MCP during mirror-set tests to prevent PDB drain deadlock OCPBUGS-99397: pause worker MCP during mirror-set tests to prevent PDB drain deadlock Jul 22, 2026
@Chandan9112
Chandan9112 force-pushed the fix/mirror-test-pdb-drain-deadlock branch from 0b62ca0 to 46e684f Compare July 22, 2026 06:24
@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 22, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@Chandan9112: This pull request references Jira Issue OCPBUGS-99397, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

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

Details

In response to this:

Bug

On 2-worker clusters (vSphere CI, AWS 1of2 splits), the [OCP-57401] and [OCP-70203] mirror-set tests cause a PDB drain deadlock during MCP rollouts. The vsphere-disruptive-longrunning-techpreview job has been consistently failing since 07/08/2026 when PR #31229 introduced the [OCP-57401] test.

Root Cause

The tests create cluster-scoped IDMS/ITMS/ICSP resources which trigger a MachineConfig update on all pools simultaneously. Since mirrorTestPool moves one worker into a custom MCP, only one worker remains in the worker pool. When both pools drain their nodes at the same time, PDB-protected pods (router, prometheus, ingress) have zero available nodes to reschedule onto — causing a drain deadlock. The worker MCP gets stuck in Updating state, cleanup times out, and subsequent tests fail on a degraded cluster.

Fix

Pause the worker MCP when creating the custom mirror test pool, and unpause it at the start of Teardown() before the node transitions back. This ensures only the custom pool node is drained during the test while the other worker remains available for PDB-protected pod scheduling.

Changes (+24 lines, -2 lines):

  • Add pauseWorkerMCP() / unpauseWorkerMCP() helper methods on mirrorTestPool
  • Call pauseWorkerMCP in newMirrorTestPool() after pool is ready
  • Call unpauseWorkerMCP at start of Teardown() before node label removal
  • Bump timeout from 10m to 15m to account for worker processing pending changes after unpause

Test Results

Tested on vSphere TechPreview cluster with 2 workers:

SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Paused worker MCP to prevent PDB drain deadlock
IDMS MCP rollout complete on custom pool mirror-test-f6cw9
Custom MCP mirror-test-f6cw9 finished rolling out after ITMS creation
Cleanup: Delete IDMS and ITMS resources
Unpaused worker MCP
Teardown: waiting for node to transition back to worker pool
Teardown: waiting for worker MCP to stabilize
MachineConfigPool worker is ready: 2/2 machines ready

Post-test cluster state — all MCPs healthy:

NAME     UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT
master   True      False      False      3              3
worker   True      False      False      2              2

All nodes Ready, no SchedulingDisabled:

ci-ln-t5dnqcb-c1627-9bmwz-worker-0-hkv84   Ready    worker
ci-ln-t5dnqcb-c1627-9bmwz-worker-0-hl9bd   Ready    worker

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes
  • Improved mirror-set end-to-end test reliability on two-worker clusters by avoiding drain deadlocks.
  • Ensured worker configuration is restored during cleanup.
  • Increased stabilization and resource cleanup timeouts to better handle slower cluster operations.

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.

@Chandan9112
Chandan9112 marked this pull request as ready for review July 22, 2026 06:33
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 22, 2026
@openshift-ci
openshift-ci Bot requested review from asahay19 and mrunalp July 22, 2026 06:34
@openshift-ci-robot

Copy link
Copy Markdown

@Chandan9112: This pull request references Jira Issue OCPBUGS-99397, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

Bug

On 2-worker clusters (vSphere CI, AWS 1of2 splits), the [OCP-57401] and [OCP-70203] mirror-set tests cause a PDB drain deadlock during MCP rollouts. The vsphere-disruptive-longrunning-techpreview job has been consistently failing since 07/08/2026 when PR #31229 introduced the [OCP-57401] test.

Root Cause

The tests create cluster-scoped IDMS/ITMS/ICSP resources which trigger a MachineConfig update on all pools simultaneously. Since mirrorTestPool moves one worker into a custom MCP, only one worker remains in the worker pool. When both pools drain their nodes at the same time, PDB-protected pods (router, prometheus, ingress) have zero available nodes to reschedule onto — causing a drain deadlock. The worker MCP gets stuck in Updating state, cleanup times out, and subsequent tests fail on a degraded cluster.

Fix

Pause the worker MCP when creating the custom mirror test pool, and unpause it at the start of Teardown() before the node transitions back. This ensures only the custom pool node is drained during the test while the other worker remains available for PDB-protected pod scheduling.

Changes (+24 lines, -2 lines):

  • Add pauseWorkerMCP() / unpauseWorkerMCP() helper methods on mirrorTestPool
  • Call pauseWorkerMCP in newMirrorTestPool() after pool is ready
  • Call unpauseWorkerMCP at start of Teardown() before node label removal
  • Bump timeout from 10m to 15m to account for worker processing pending changes after unpause

Test Results

Tested on vSphere TechPreview cluster with 2 workers:

 Running Suite:  - /Users/cmaurya/go/src/github.com/openshift/origin
 ===================================================================
 Random Seed: 1784701586 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-node][Suite:openshift/disruptive-longrunning][Disruptive][Serial] ImageTagMirrorSet and ImageDigestMirrorSet [OTP] Create ImageDigestMirrorSet and ImageTagMirrorSet and verify registries.conf [OCP-57401]
 github.com/openshift/origin/test/extended/node/node_e2e/image_mirror_set.go:236
   STEP: Creating a kubernetes client @ 07/22/26 11:56:38.879
 I0722 11:56:38.880515   93116 discovery.go:214] Invalidating discovery information
 I0722 11:56:38.881364 93116 framework.go:2330] [precondition-check] checking if cluster is MicroShift
 I0722 11:56:39.183964 93116 framework.go:2353] IsMicroShiftCluster: microshift-version configmap not found, not MicroShift
 I0722 11:57:11.360996 93116 image_mirror_set.go:93] Custom mirror test pool mirror-test-psrq6 ready on node ci-ln-t5dnqcb-c1627-9bmwz-worker-0-hkv84
 I0722 11:57:11.679147 93116 image_mirror_set.go:114] Paused worker MCP to prevent PDB drain deadlock
   STEP: Step 1: Create an ImageDigestMirrorSet @ 07/22/26 11:57:11.679
 I0722 11:57:12.288861 93116 image_mirror_set.go:274] ImageDigestMirrorSet "digest-mirror-t2llr" created successfully
 I0722 11:57:12.288970 93116 imagepolicy.go:689] Waiting for pool mirror-test-psrq6 to complete
 I0722 11:57:43.754080 93116 image_mirror_set.go:291] IDMS MCP rollout complete on custom pool mirror-test-psrq6
   STEP: Step 2: Create an ImageTagMirrorSet @ 07/22/26 11:57:43.754
 I0722 11:57:44.373342 93116 image_mirror_set.go:323] ImageTagMirrorSet "tag-mirror-t2llr" created successfully
   STEP: Step 3: Wait for custom MCP to finish rolling out @ 07/22/26 11:57:44.373
 I0722 11:57:44.373417 93116 imagepolicy.go:689] Waiting for pool mirror-test-psrq6 to complete
 I0722 11:59:17.510904 93116 image_mirror_set.go:327] Custom MCP mirror-test-psrq6 finished rolling out after ITMS creation
   STEP: Step 4: Verify /etc/containers/registries.conf on the custom pool node @ 07/22/26 11:59:17.511
 I0722 11:59:31.061383 93116 image_mirror_set.go:331] registries.conf on ci-ln-t5dnqcb-c1627-9bmwz-worker-0-hkv84: read 1177 bytes, asserting expected entries
   STEP: Verify IDMS entries (digest-only mirrors) @ 07/22/26 11:59:31.061
   STEP: Verify ITMS entries (tag-only mirrors) @ 07/22/26 11:59:31.061
   STEP: Verify NeverContactSource entries are blocked @ 07/22/26 11:59:31.061
   STEP: Cleanup: Delete IDMS and ITMS resources @ 07/22/26 11:59:31.064
 I0722 11:59:31.978508 93116 imagepolicy.go:689] Waiting for pool mirror-test-psrq6 to complete
 I0722 12:01:06.240014 93116 image_mirror_set.go:121] Unpaused worker MCP
 I0722 12:01:06.240104 93116 image_mirror_set.go:135] Teardown: removing label node-role.kubernetes.io/mirror-test-psrq6 from node ci-ln-t5dnqcb-c1627-9bmwz-worker-0-hkv84
 I0722 12:01:06.575588 93116 image_mirror_set.go:142] Teardown: waiting for node ci-ln-t5dnqcb-c1627-9bmwz-worker-0-hkv84 to transition back to worker pool
 I0722 12:01:37.589452 93116 image_mirror_set.go:162] Teardown: waiting for worker MCP to stabilize
 I0722 12:01:37.589550 93116 node_utils.go:611] Waiting for MCP worker to be ready (timeout: 15m0s)...
 I0722 12:01:37.894104 93116 node_utils.go:685] MachineConfigPool worker is ready: 2/2 machines ready
 • [299.039 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 299.040 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Post-test cluster state — all MCPs healthy:

NAME     UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT
master   True      False      False      3              3
worker   True      False      False      2              2

All nodes Ready, no SchedulingDisabled:

ci-ln-t5dnqcb-c1627-9bmwz-worker-0-hkv84   Ready    worker
ci-ln-t5dnqcb-c1627-9bmwz-worker-0-hl9bd   Ready    worker

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes
  • Improved mirror-set end-to-end test reliability on two-worker clusters by avoiding drain deadlocks.
  • Ensured worker configuration is restored during cleanup.
  • Increased stabilization and resource cleanup timeouts to better handle slower cluster operations.

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

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@BhargaviGudi

Copy link
Copy Markdown
Contributor

/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-disruptive-longrunning-techpreview

@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@BhargaviGudi: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-disruptive-longrunning-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/c57ee790-85b1-11f1-839f-e365ebbac51d-0

@BhargaviGudi

Copy link
Copy Markdown
Contributor

/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-azure-disruptive-longrunning-techpreview-1of2

@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@BhargaviGudi: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-azure-disruptive-longrunning-techpreview-1of2

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/79743d90-85b2-11f1-837f-5e32378ade18-0

@ngopalak-redhat

Copy link
Copy Markdown
Contributor

@Chandan9112 Pause is useful to prevent the MCO from changing node config, or when you want to stack up a whole bunch of changes and only take a single reboot. Have you thought of other ways to solve this?

@Chandan9112

Copy link
Copy Markdown
Contributor Author

@Chandan9112 Pause is useful to prevent the MCO from changing node config, or when you want to stack up a whole bunch of changes and only take a single reboot. Have you thought of other ways to solve this?

@ngopalak-redhat I thought of removing the custom MCP entirely and testing on the worker pool directly (sequential drain via default maxUnavailable=1), but that's a larger refactor. For now, pause is the lightest fix to unblock CI — worker nodes stay fully schedulable, only config updates are deferred, and it's cleanly reversed in Teardown.

@ngopalak-redhat

Copy link
Copy Markdown
Contributor

@Chandan9112 Can we try removing custom MCP for cluster level resources? Will be helpful on a long term.

@openshift-ci-robot

Copy link
Copy Markdown

@Chandan9112: This pull request references Jira Issue OCPBUGS-99397, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

Bug

On 2-worker clusters (vSphere CI, AWS 1of2 splits), the [OCP-57401] and [OCP-70203] mirror-set tests cause a PDB drain deadlock during MCP rollouts. The vsphere-disruptive-longrunning-techpreview job has been consistently failing since 07/08/2026 when PR #31229 introduced the [OCP-57401] test.

Root Cause

The tests create cluster-scoped IDMS/ITMS/ICSP resources which trigger a MachineConfig update on all pools simultaneously. Since mirrorTestPool moves one worker into a custom MCP, only one worker remains in the worker pool. When both pools drain their nodes at the same time, PDB-protected pods (router, prometheus, ingress) have zero available nodes to reschedule onto — causing a drain deadlock. The worker MCP gets stuck in Updating state, cleanup times out, and subsequent tests fail on a degraded cluster.

Fix

Pause the worker MCP when creating the custom mirror test pool, and unpause it at the start of Teardown() before the node transitions back. This ensures only the custom pool node is drained during the test while the other worker remains available for PDB-protected pod scheduling.

Changes (+24 lines, -2 lines):

  • Add pauseWorkerMCP() / unpauseWorkerMCP() helper methods on mirrorTestPool
  • Call pauseWorkerMCP in newMirrorTestPool() after pool is ready
  • Call unpauseWorkerMCP at start of Teardown() before node label removal
  • Bump timeout from 10m to 15m to account for worker processing pending changes after unpause

Test Results

Tested on vSphere TechPreview cluster with 2 workers:

 Running Suite:  - /Users/cmaurya/go/src/github.com/openshift/origin
 ===================================================================
 Random Seed: 1784726830 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-node][Suite:openshift/disruptive-longrunning][Disruptive][Serial] ImageTagMirrorSet and ImageDigestMirrorSet [OTP] Create ImageDigestMirrorSet and ImageTagMirrorSet and verify registries.conf [OCP-57401]
 github.com/openshift/origin/test/extended/node/node_e2e/image_mirror_set.go:66
   STEP: Creating a kubernetes client @ 07/22/26 18:57:19.332
 I0722 18:57:19.332854   11561 discovery.go:214] Invalidating discovery information
 I0722 18:57:19.334055 11561 framework.go:2330] [precondition-check] checking if cluster is MicroShift
 I0722 18:57:19.632628 11561 framework.go:2353] IsMicroShiftCluster: microshift-version configmap not found, not MicroShift
   STEP: Step 1: Create an ImageDigestMirrorSet @ 07/22/26 18:57:20.284
 I0722 18:57:20.593220 11561 image_mirror_set.go:100] ImageDigestMirrorSet "digest-mirror-gwghg" created successfully
   STEP: Step 2: Wait for worker MCP rollout and verify IDMS entries in registries.conf @ 07/22/26 18:57:20.593
 I0722 18:57:20.593496 11561 imagepolicy.go:689] Waiting for pool worker to complete
 I0722 18:58:12.486015 11561 image_mirror_set.go:119] Worker MCP rollout complete after IDMS creation
 I0722 18:58:23.588885 11561 image_mirror_set.go:122] registries.conf after IDMS: read 668 bytes
   STEP: Step 3: Create an ImageTagMirrorSet @ 07/22/26 18:58:23.589
 I0722 18:58:24.204243 11561 image_mirror_set.go:163] ImageTagMirrorSet "tag-mirror-gwghg" created successfully
   STEP: Step 4: Wait for worker MCP rollout and verify ITMS entries alongside IDMS @ 07/22/26 18:58:24.204
 I0722 18:58:24.204331 11561 imagepolicy.go:689] Waiting for pool worker to complete
 I0722 19:02:52.948012 11561 image_mirror_set.go:167] Worker MCP rollout complete after ITMS creation
 I0722 19:03:05.135560 11561 image_mirror_set.go:170] registries.conf after ITMS: read 1177 bytes
   STEP: Cleanup: Delete IDMS and ITMS resources @ 07/22/26 19:03:05.139
 I0722 19:03:06.054788 11561 imagepolicy.go:689] Waiting for pool worker to complete
 • [749.476 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 749.477 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Post-test cluster state — all MCPs healthy:

NAME     UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT
master   True      False      False      3              3
worker   True      False      False      2              2

All nodes Ready, no SchedulingDisabled:

ci-ln-t5dnqcb-c1627-9bmwz-worker-0-hkv84   Ready    worker
ci-ln-t5dnqcb-c1627-9bmwz-worker-0-hl9bd   Ready    worker

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes
  • Improved mirror-set end-to-end test reliability on two-worker clusters by avoiding drain deadlocks.
  • Ensured worker configuration is restored during cleanup.
  • Increased stabilization and resource cleanup timeouts to better handle slower cluster operations.

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.

@Chandan9112
Chandan9112 force-pushed the fix/mirror-test-pdb-drain-deadlock branch from 46e684f to 1733cb9 Compare July 22, 2026 14:15
…dlock

The mirror-set tests (OCP-57401, OCP-70203) used a custom single-node
MachineConfigPool to isolate rollouts. However, cluster-scoped IDMS/ITMS/ICSP
resources trigger config changes on all pools simultaneously. On 2-worker
clusters, this caused both the custom pool and worker pool to drain nodes
concurrently, leading to a PDB deadlock where PDB-protected pods had nowhere
to reschedule.

Fix: Remove the custom MCP entirely and test directly on the worker and master
pools. The MCO handles pool rollouts sequentially (maxUnavailable=1), so nodes
drain one at a time and PDB-protected pods can always reschedule.

Bug: OCPBUGS-99397
Co-authored-by: Cursor <cursoragent@cursor.com>
@Chandan9112
Chandan9112 force-pushed the fix/mirror-test-pdb-drain-deadlock branch from c59722a to 1972030 Compare July 23, 2026 05:30
@Chandan9112

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-aws-disruptive-longrunning

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@Chandan9112: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-aws-disruptive-longrunning

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/8e9c0670-8658-11f1-9f79-9cc90db56f9b-0

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@QiWang19

Copy link
Copy Markdown
Member

/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-disruptive-longrunning-techpreview
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-gcp-disruptive-longrunning-techpreview-2of2

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@QiWang19: trigger 2 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-disruptive-longrunning-techpreview
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-gcp-disruptive-longrunning-techpreview-2of2

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/897ef9d0-86c7-11f1-94b7-3ddea5d78d25-0

@Chandan9112

Copy link
Copy Markdown
Contributor Author

@QiWang19: trigger 2 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-disruptive-longrunning-techpreview
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-gcp-disruptive-longrunning-techpreview-2of2

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/897ef9d0-86c7-11f1-94b7-3ddea5d78d25-0

@QiWang19 ., I see job is passing in CI in shard 2

@Chandan9112

Copy link
Copy Markdown
Contributor Author

/retest

@QiWang19 QiWang19 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.

From the machine-config-controller log, this failure seems to be a test case timeout; the master nodes still processed the drain from the cleanup source deletion when the test suite timed out.
We probably need to refactor the whole test case to avoid including many steps and rollouts.

To unblock us and get the required pass rate for API graduation, we may try a temporary workaround for now:

  1. Pause master pool
  2. Create/delete resources during test steps → only worker drains
  3. Cleanup: delete all remaining resources
  4. Unpause master → MCO renders config, sees it matches what masters already have → no rollout, no drain
  5. Wait for both pools to be Updated=True

func (p *mirrorTestPool) waitForRollout(initialSpec string) {
imagepolicy.WaitForMCPConfigSpecChangeAndUpdated(p.oc, p.PoolName, initialSpec)
func waitForPoolsRollout(oc *exutil.CLI, workerSpec, masterSpec string) {
imagepolicy.WaitForMCPConfigSpecChangeAndUpdated(oc, "worker", workerSpec)

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.

If use WaitForMCPsConfigSpecChangeAndUpdated to wait for both pool at the same time, would this save more time for this testcase?

@Chandan9112 Chandan9112 Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @QiWang19 ., Yes it reduced ~7 min of time. The latest code has been pushed. Can you have a review now?

@Chandan9112

Copy link
Copy Markdown
Contributor Author

From the machine-config-controller log, this failure seems to be a test case timeout; the master nodes still processed the drain from the cleanup source deletion when the test suite timed out. We probably need to refactor the whole test case to avoid including many steps and rollouts.

To unblock us and get the required pass rate for API graduation, we may try a temporary workaround for now:

  1. Pause master pool
  2. Create/delete resources during test steps → only worker drains
  3. Cleanup: delete all remaining resources
  4. Unpause master → MCO renders config, sees it matches what masters already have → no rollout, no drain
  5. Wait for both pools to be Updated=True

Neeraj already pushed back on the pause approach in this PR — he suggested removing the custom MCP instead, which we've done.

During test steps, only wait for worker pool rollout since registries.conf
verification is performed exclusively on worker nodes. Master pool drains
in the background concurrently.

In cleanup, wait for both worker and master pools to ensure the cluster is
fully stable before the next test runs.

This reduces test execution time significantly (~30-40%) while maintaining
correctness and cluster stability guarantees.

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci-robot

Copy link
Copy Markdown

@Chandan9112: This pull request references Jira Issue OCPBUGS-99397, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (cmaurya@redhat.com), skipping review request.

Details

In response to this:

Bug

https://redhat.atlassian.net/browse/OCPBUGS-99397

Problem

The mirror-set tests (OCP-57401, OCP-70203) used a custom single-node MachineConfigPool to isolate rollouts. However, cluster-scoped IDMS/ITMS/ICSP resources trigger config changes on all MachineConfigPools simultaneously. On 2-worker clusters (vSphere, AWS 1-of-2 split), this caused both the custom pool and the worker pool to drain nodes concurrently, leading to a PDB drain deadlock where PDB-protected pods (router, prometheus, etc.) had nowhere to reschedule — blocking the drain indefinitely and leaving the cluster degraded.

This caused the vsphere-disruptive-longrunning-techpreview and aws-disruptive-longrunning-techpreview jobs to fail consistently since 07/08/2026 when the tests were introduced via #31229.

Fix

Remove the custom MCP entirely and test directly on the worker pool. The MCO handles worker pool rollouts sequentially (maxUnavailable=1 by default), so nodes drain one at a time and PDB-protected pods can always reschedule to available nodes.

Key changes:

  • Removed mirrorTestPool struct and all associated methods (create, teardown, pause/unpause)
  • Both tests now operate directly on the worker pool using simple helpers: getWorkerSpec(), waitForWorkerRollout(), readRegistriesConfOnWorker()
  • Test assertions remain identical — same IDMS/ITMS/ICSP creation, same registries.conf verification
  • Cleanup simply deletes resources and waits for worker pool to stabilize

Testing

 Running Suite:  - /Users/cmaurya/go/src/github.com/openshift/origin
 ===================================================================
 Random Seed: 1784874205 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-node][Suite:openshift/disruptive-longrunning][Disruptive][Serial] ImageTagMirrorSet and ImageDigestMirrorSet [OTP] Create ImageDigestMirrorSet and ImageTagMirrorSet and verify registries.conf [OCP-57401]
 github.com/openshift/origin/test/extended/node/node_e2e/image_mirror_set.go:79
   STEP: Creating a kubernetes client @ 07/24/26 11:53:32.988
 I0724 11:53:32.989623   24919 discovery.go:214] Invalidating discovery information
 I0724 11:53:32.991298 24919 framework.go:2330] [precondition-check] checking if cluster is MicroShift
 I0724 11:53:33.307721 24919 framework.go:2353] IsMicroShiftCluster: microshift-version configmap not found, not MicroShift
   STEP: Step 1: Create an ImageDigestMirrorSet @ 07/24/26 11:53:34.073
 I0724 11:53:34.426657 24919 image_mirror_set.go:113] ImageDigestMirrorSet "digest-mirror-zdlxz" created successfully
   STEP: Step 2: Wait for worker MCP rollout and verify IDMS entries in registries.conf @ 07/24/26 11:53:34.426
 I0724 11:53:34.426730 24919 imagepolicy.go:689] Waiting for pool worker to complete
 I0724 11:54:27.273356 24919 image_mirror_set.go:136] Worker MCP rollout complete after IDMS creation
 I0724 11:54:33.235519 24919 image_mirror_set.go:139] registries.conf after IDMS: read 668 bytes
   STEP: Step 3: Create an ImageTagMirrorSet @ 07/24/26 11:54:33.235
 I0724 11:54:33.865257 24919 image_mirror_set.go:180] ImageTagMirrorSet "tag-mirror-zdlxz" created successfully
   STEP: Step 4: Wait for worker MCP rollout and verify ITMS entries alongside IDMS @ 07/24/26 11:54:33.865
 I0724 11:54:33.865405 24919 imagepolicy.go:689] Waiting for pool worker to complete
 I0724 11:59:46.092744 24919 image_mirror_set.go:184] Worker MCP rollout complete after ITMS creation
 I0724 11:59:50.901695 24919 image_mirror_set.go:187] registries.conf after ITMS: read 1177 bytes
   STEP: Cleanup: Delete IDMS and ITMS resources @ 07/24/26 11:59:50.905
 I0724 11:59:52.175126 24919 imagepolicy.go:708] Waiting for worker and master pools to complete
 I0724 11:59:52.802784 24919 imagepolicy.go:731] Worker MCP not ready yet
 I0724 12:10:56.751307 24919 imagepolicy.go:734] Master MCP not ready yet
 I0724 12:11:07.438187 24919 imagepolicy.go:734] Master MCP not ready yet
 I0724 12:11:18.082603 24919 imagepolicy.go:734] Master MCP not ready yet
 I0724 12:11:28.726063 24919 imagepolicy.go:739] Both worker and master pools completed successfully
 • [1075.749 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 1075.752 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped


Both MCPs returned to `Updated=True, Degraded=False` after test completion:

NAME UPDATED UPDATING DEGRADED
master True False False
worker True False False


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

## Summary by CodeRabbit

* **Bug Fixes**
 * Improved mirror-set end-to-end validation by tracking rollout and stabilization directly via the cluster’s `worker` and `master` MachineConfigPools.
 * Strengthened test cleanup to ensure mirror-set removal completes and both pools settle before finishing.

* **Tests**
 * Added polling checks to confirm MachineConfigPool spec stability within an expected time window.
 * Expanded assertions by reading `/etc/containers/registries.conf` to verify digest-only vs tag-only mirror entries and `NeverContactSource`-blocked behavior, including correct coexistence updates and removals.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

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-robot

Copy link
Copy Markdown

@Chandan9112: This pull request references Jira Issue OCPBUGS-99397, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (cmaurya@redhat.com), skipping review request.

Details

In response to this:

Bug

https://redhat.atlassian.net/browse/OCPBUGS-99397

Problem

The mirror-set tests (OCP-57401, OCP-70203) used a custom single-node MachineConfigPool to isolate rollouts. However, cluster-scoped IDMS/ITMS/ICSP resources trigger config changes on all MachineConfigPools simultaneously. On 2-worker clusters (vSphere, AWS 1-of-2 split), this caused both the custom pool and the worker pool to drain nodes concurrently, leading to a PDB drain deadlock where PDB-protected pods (router, prometheus, etc.) had nowhere to reschedule — blocking the drain indefinitely and leaving the cluster degraded.

This caused the vsphere-disruptive-longrunning-techpreview and aws-disruptive-longrunning-techpreview jobs to fail consistently since 07/08/2026 when the tests were introduced via #31229.

Fix

Remove the custom MCP entirely and test directly on the worker pool. The MCO handles worker pool rollouts sequentially (maxUnavailable=1 by default), so nodes drain one at a time and PDB-protected pods can always reschedule to available nodes.

Key changes:

  • Removed mirrorTestPool struct and all associated methods (create, teardown, pause/unpause)
  • Both tests now operate directly on the worker pool using simple helpers: getWorkerSpec(), waitForWorkerRollout(), readRegistriesConfOnWorker()
  • Test assertions remain identical — same IDMS/ITMS/ICSP creation, same registries.conf verification
  • Cleanup simply deletes resources and waits for worker pool to stabilize

Testing

 Running Suite:  - /Users/cmaurya/go/src/github.com/openshift/origin
 ===================================================================
 Random Seed: 1784874205 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-node][Suite:openshift/disruptive-longrunning][Disruptive][Serial] ImageTagMirrorSet and ImageDigestMirrorSet [OTP] Create ImageDigestMirrorSet and ImageTagMirrorSet and verify registries.conf [OCP-57401]
 github.com/openshift/origin/test/extended/node/node_e2e/image_mirror_set.go:79
   STEP: Creating a kubernetes client @ 07/24/26 11:53:32.988
 I0724 11:53:32.989623   24919 discovery.go:214] Invalidating discovery information
 I0724 11:53:32.991298 24919 framework.go:2330] [precondition-check] checking if cluster is MicroShift
 I0724 11:53:33.307721 24919 framework.go:2353] IsMicroShiftCluster: microshift-version configmap not found, not MicroShift
   STEP: Step 1: Create an ImageDigestMirrorSet @ 07/24/26 11:53:34.073
 I0724 11:53:34.426657 24919 image_mirror_set.go:113] ImageDigestMirrorSet "digest-mirror-zdlxz" created successfully
   STEP: Step 2: Wait for worker MCP rollout and verify IDMS entries in registries.conf @ 07/24/26 11:53:34.426
 I0724 11:53:34.426730 24919 imagepolicy.go:689] Waiting for pool worker to complete
 I0724 11:54:27.273356 24919 image_mirror_set.go:136] Worker MCP rollout complete after IDMS creation
 I0724 11:54:33.235519 24919 image_mirror_set.go:139] registries.conf after IDMS: read 668 bytes
   STEP: Step 3: Create an ImageTagMirrorSet @ 07/24/26 11:54:33.235
 I0724 11:54:33.865257 24919 image_mirror_set.go:180] ImageTagMirrorSet "tag-mirror-zdlxz" created successfully
   STEP: Step 4: Wait for worker MCP rollout and verify ITMS entries alongside IDMS @ 07/24/26 11:54:33.865
 I0724 11:54:33.865405 24919 imagepolicy.go:689] Waiting for pool worker to complete
 I0724 11:59:46.092744 24919 image_mirror_set.go:184] Worker MCP rollout complete after ITMS creation
 I0724 11:59:50.901695 24919 image_mirror_set.go:187] registries.conf after ITMS: read 1177 bytes
   STEP: Cleanup: Delete IDMS and ITMS resources @ 07/24/26 11:59:50.905
 I0724 11:59:52.175126 24919 imagepolicy.go:708] Waiting for worker and master pools to complete
 I0724 11:59:52.802784 24919 imagepolicy.go:731] Worker MCP not ready yet
 I0724 12:10:56.751307 24919 imagepolicy.go:734] Master MCP not ready yet
 I0724 12:11:07.438187 24919 imagepolicy.go:734] Master MCP not ready yet
 I0724 12:11:18.082603 24919 imagepolicy.go:734] Master MCP not ready yet
 I0724 12:11:28.726063 24919 imagepolicy.go:739] Both worker and master pools completed successfully
 • [1075.749 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 1075.752 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Both MCPs returned to Updated=True, Degraded=False after test completion:

NAME     UPDATED   UPDATING   DEGRADED
master   True      False      False
worker   True      False      False

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes

  • Improved mirror-set end-to-end validation by tracking rollout and stabilization directly via the cluster’s worker and master MachineConfigPools.

  • Strengthened test cleanup to ensure mirror-set removal completes and both pools settle before finishing.

  • Tests

  • Added polling checks to confirm MachineConfigPool spec stability within an expected time window.

  • Expanded assertions by reading /etc/containers/registries.conf to verify digest-only vs tag-only mirror entries and NeverContactSource-blocked behavior, including correct coexistence updates and removals.

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.

@Chandan9112

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-disruptive-longrunning-techpreview

@openshift-ci

openshift-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@Chandan9112: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-disruptive-longrunning-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/2ed8b1a0-872c-11f1-98c4-ff3966c08fa4-0

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@QiWang19

Copy link
Copy Markdown
Member

openshift/api#2844 (comment)
Feature promotion test can not get test result on vsphere due to the the failure. https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_api/2844/pull-ci-openshift-api-master-verify-feature-promotion/2079919113605484544
This is the only issue block us from promoting CRIOCredentialProviderConfig.
Probably pause the pool as a workaround fix or revert this test case.

@QiWang19

Copy link
Copy Markdown
Member

We can also wait for openshift/release#81923 to ignoring mirror-set test on techpreview jobs.

@Chandan9112

Chandan9112 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

openshift/api#2844 (comment) Feature promotion test can not get test result on vsphere due to the the failure. https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_api/2844/pull-ci-openshift-api-master-verify-feature-promotion/2079919113605484544 This is the only issue block us from promoting CRIOCredentialProviderConfig. Probably pause the pool as a workaround fix or revert this test case.

@QiWang19 ., I have paused the pool as fix., it will resolve deadlock issue as tested locally on vsphere cluster.

Pause the master MCP at the start of each test so only worker nodes drain
during test steps. In cleanup, after all test resources are deleted, unpause
master — MCO sees the master config matches its current state (since resources
were removed before unpause), so no drain is needed.

This eliminates master drain time entirely from both the test body and cleanup,
preventing the suite timeout that was blocking CRIOCredentialProviderConfig
feature promotion (openshift/api#2844).

Co-authored-by: Cursor <cursoragent@cursor.com>
@Chandan9112
Chandan9112 force-pushed the fix/mirror-test-pdb-drain-deadlock branch from c3d9e1f to 5bf65f1 Compare July 25, 2026 02:06
@Chandan9112 Chandan9112 changed the title OCPBUGS-99397: remove custom MCP from mirror-set tests to prevent PDB drain deadlock OCPBUGS-99397: remove custom MCP and pause master pool in mirror-set tests to prevent PDB drain deadlock and suite timeout Jul 25, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@Chandan9112: This pull request references Jira Issue OCPBUGS-99397, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (cmaurya@redhat.com), skipping review request.

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

Details

In response to this:

Summary

Fixes PDB drain deadlock and suite timeout in [OCP-57401] and [OCP-70203] mirror-set tests on 2-worker clusters (vSphere, AWS 1of2 split).

Root Cause

The tests previously used a custom mirrorTestPool MCP for a single worker node. Since IDMS/ITMS/ICSP are cluster-scoped, creating them triggered rollouts on both the custom MCP and the main worker MCP simultaneously. On 2-worker clusters, MCO attempted to drain both workers at once, but PodDisruptionBudgets prevented pod rescheduling — causing a deadlock where neither node could drain and MCP rollouts stalled indefinitely.

Additionally, since IDMS/ITMS are cluster-scoped, they also trigger master pool rollouts. On clusters with 3 master nodes, draining masters sequentially during cleanup adds significant time (~15-20 min), causing the overall disruptive test suite to timeout.

Fix

  1. Remove custom MCP entirely — Tests now operate directly on the worker pool, eliminating the concurrent drain scenario that caused the PDB deadlock.

  2. Pause master pool during test execution — Since we only verify registries.conf on worker nodes, the master pool drain is unnecessary for test validation. Pausing the master at test start and unpausing in DeferCleanup prevents master drains from contributing to suite timeout.

  3. Use worker-only waits in test body — Test steps use waitForWorkerRollout (calls imagepolicy.WaitForMCPConfigSpecChangeAndUpdated) to wait only for the worker pool during verification steps, reducing blocking time.

  4. Use parallel pool waits in cleanup — Cleanup uses waitForPoolsRollout (calls imagepolicy.WaitForMCPsConfigSpecChangeAndUpdated) to wait for both worker and master pools in parallel, ensuring cluster stability before the next test.

Changes

  • Removed mirrorTestPool struct, methods, and all custom MCP lifecycle code
  • Added pauseMasterPool / unpauseMasterPool helpers
  • Added getWorkerMCPSpec / waitForWorkerRollout / waitForPoolsRollout / readRegistriesConfOnWorker helpers
  • Both OCP-57401 and OCP-70203 tests updated to use new approach

Testing

  • Verified on vSphere 5.0 TechPreview cluster (2 workers, 3 masters)
  • Both OCP-57401 and OCP-70203 pass successfully
  • Worker MCP stabilizes after test, master unpaused reliably via DeferCleanup
  • Test execution time: ~18-19 min per test (down from 35-40 min with master drains)
  • No impact on other tests — changes are scoped to mirror-set test file only

Bug Reference

https://redhat.atlassian.net/browse/OCPBUGS-99397

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.

@Chandan9112

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@openshift-ci

openshift-ci Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

@Chandan9112: The following test 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/e2e-gcp-ovn 0fa9092 link true /test e2e-gcp-ovn

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.

@Chandan9112

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-disruptive-longrunning-techpreview

@openshift-ci

openshift-ci Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

@Chandan9112: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-disruptive-longrunning-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/1de04700-87f9-11f1-9c4e-6f1554f631de-0

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

Labels

jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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.

5 participants