Skip to content

OCPBUGS-78617: Fix PinnedImages test should respect node taints#30913

Merged
openshift-merge-bot[bot] merged 3 commits intoopenshift:mainfrom
bshaw7:fix/pinnedimages-respect-node-taints
Mar 28, 2026
Merged

OCPBUGS-78617: Fix PinnedImages test should respect node taints#30913
openshift-merge-bot[bot] merged 3 commits intoopenshift:mainfrom
bshaw7:fix/pinnedimages-respect-node-taints

Conversation

@bshaw7
Copy link
Copy Markdown
Contributor

@bshaw7 bshaw7 commented Mar 20, 2026

The PinnedImages conformance test was selecting worker nodes by label only, ignoring node taints. This caused issues in environments with dedicated/tainted nodes (e.g., OPCT test infrastructure, edge zones).

Problem:

  • Test created custom MachineConfigPool targeting any worker node
  • Could select nodes with NoSchedule/NoExecute taints
  • In OPCT, selecting the dedicated node caused Sonobuoy pod eviction and test failure.

Solution:

  • Use e2enode.GetReadySchedulableNodes() to filter nodes
  • This function excludes nodes with NoSchedule/NoExecute taints
  • Follows the same pattern used by other OpenShift conformance tests

Changes:

  • Added import: e2enode "k8s.io/kubernetes/test/e2e/framework/node"
  • Modified addWorkerNodesToCustomPool() to:
    1. Get schedulable nodes using e2enode.GetReadySchedulableNodes()
    2. Filter for worker nodes only
    3. Select from schedulable workers (excluding tainted nodes)

Testing:

  • Verified node filtering logic correctly excludes tainted nodes
  • Tested on cluster with dedicated OPCT node (node-role.kubernetes.io/tests:NoSchedule)
  • Dedicated node correctly filtered out, test selects from 3 schedulable workers

Fixes: https://redhat.atlassian.net/browse/OCPBUGS-78617

@openshift-ci-robot
Copy link
Copy Markdown

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 01ba3891-baa4-4004-b816-c9651a22d7a1

📥 Commits

Reviewing files that changed from the base of the PR and between a1174a7 and a06beca.

📒 Files selected for processing (2)
  • test/extended/machine_config/pinnedimages.go
  • test/extended/util/node_helpers.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/extended/machine_config/pinnedimages.go

Walkthrough

A new helper function filters nodes to identify ready, schedulable worker nodes by excluding control-plane and master nodes. The test code is refactored to use this function and changed to skip tests when insufficient worker nodes exist rather than returning errors.

Changes

Cohort / File(s) Summary
New Helper Function
test/extended/util/node_helpers.go
Added GetReadySchedulableWorkerNodes function that retrieves ready and schedulable nodes, then filters to include only worker nodes (with node-role.kubernetes.io/worker label but without control-plane or master labels).
Test Refactoring
test/extended/machine_config/pinnedimages.go
Refactored addWorkerNodesToCustomPool to use the new GetReadySchedulableWorkerNodes function. Changed insufficient node handling from returning an error to skipping the test with g.Skip(...) after logging.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.11.4)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@bshaw7 bshaw7 marked this pull request as draft March 20, 2026 13:52
@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 Mar 20, 2026
Comment on lines +363 to +370
// Filter for worker nodes only
var workerNodes []corev1.Node
for _, node := range nodes.Items {
if _, hasWorkerLabel := node.Labels["node-role.kubernetes.io/worker"]; hasWorkerLabel {
workerNodes = append(workerNodes, node)
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@bshaw7 I think we could create a exported function in the package test/extended/node, maybe in node_utils.go, to wrap this logic with e2enode.GetReadySchedulableNodes so that other tests can reuse that logic (retrieve all scheduable worker nodes).

WDYT?

Copy link
Copy Markdown
Contributor Author

@bshaw7 bshaw7 Mar 20, 2026

Choose a reason for hiding this comment

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

@mtulio That's good idea to make it re-usable. So far i updated OCPBUGS-78617 with test result without exported function. Next I'll create exporter function and add test result of that too.

@bshaw7 bshaw7 changed the title Fix PinnedImages test should respect node taints OCPBUGS-78617: Fix PinnedImages test should respect node taints Mar 20, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Mar 20, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@bshaw7: This pull request references Jira Issue OCPBUGS-78617, 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 (4.22.0) matches configured target version for branch (4.22.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:

The PinnedImages conformance test was selecting worker nodes by label only, ignoring node taints. This caused issues in environments with dedicated/tainted nodes (e.g., OPCT test infrastructure, edge zones).

Problem:

  • Test created custom MachineConfigPool targeting any worker node
  • Could select nodes with NoSchedule/NoExecute taints
  • In OPCT, selecting the dedicated node caused Sonobuoy pod eviction and test failure.

Solution:

  • Use e2enode.GetReadySchedulableNodes() to filter nodes
  • This function excludes nodes with NoSchedule/NoExecute taints
  • Follows the same pattern used by other OpenShift conformance tests

Changes:

  • Added import: e2enode "k8s.io/kubernetes/test/e2e/framework/node"
  • Modified addWorkerNodesToCustomPool() to:
  1. Get schedulable nodes using e2enode.GetReadySchedulableNodes()
  2. Filter for worker nodes only
  3. Select from schedulable workers (excluding tainted nodes)

Testing:

  • Verified node filtering logic correctly excludes tainted nodes
  • Tested on cluster with dedicated OPCT node (node-role.kubernetes.io/tests:NoSchedule)
  • Dedicated node correctly filtered out, test selects from 3 schedulable workers

Fixes: https://redhat.atlassian.net/browse/OCPBUGS-78617

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.

@mtulio
Copy link
Copy Markdown
Contributor

mtulio commented Mar 20, 2026

/payload-job periodic-ci-openshift-release-main-nightly-4.19-opct-external-aws-ccm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 20, 2026

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

  • periodic-ci-openshift-release-main-nightly-4.19-opct-external-aws-ccm

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/cb1fbc90-247e-11f1-8e80-2eb60f5762cd-0

@mtulio
Copy link
Copy Markdown
Contributor

mtulio commented Mar 24, 2026

/payload-job periodic-ci-openshift-release-main-nightly-4.19-opct-external-aws-ccm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 24, 2026

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

  • periodic-ci-openshift-release-main-nightly-4.19-opct-external-aws-ccm

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/30cc6790-2782-11f1-810c-f7710a795c2b-0

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 24, 2026
@bshaw7 bshaw7 force-pushed the fix/pinnedimages-respect-node-taints branch from af1538d to 9b9fb62 Compare March 24, 2026 13:17
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 24, 2026
Copy link
Copy Markdown
Contributor

@mtulio mtulio left a comment

Choose a reason for hiding this comment

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

Overall looks good to me. We need to make sure the payload job will run as expected, then trigger the required jobs for the pipeline (/pipeline required)

@bshaw7
Copy link
Copy Markdown
Contributor Author

bshaw7 commented Mar 24, 2026

/payload-job periodic-ci-openshift-release-main-nightly-4.19-opct-external-aws-ccm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 24, 2026

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

  • periodic-ci-openshift-release-main-nightly-4.19-opct-external-aws-ccm

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/d2dfc640-279f-11f1-8d01-b0e33c149076-0

@bshaw7
Copy link
Copy Markdown
Contributor Author

bshaw7 commented Mar 24, 2026

  • payload-job periodic-ci-openshift-release-main-nightly-4.19-opct-external-aws-ccm is getting failed with below reason.

Mar 24 17:13:58 ip-10-0-5-186 podman[3504]: 2026-03-24 17:13:58.114017596 +0000 UTC m=+0.073066224 container attach fd872399cb451ac11c01a7c1850c5405605d75360bfae9d930bc748d55a13478 (image=registry.build06.ci.openshift.org/ci-op-6gbdjw1h/release@sha256:c0d33113593724faf597a19b6aad967fe7d2434101c8a0a36269ecc5ec5b29b5, name=cvo-render, io.openshift.release=4.19.0-0.nightly-2026-03-17-202923, io.openshift.release.base-image-digest=sha256:77d38e14b96ab370e8c0a8015c3403d7019cb6877ba49a6b67422265db18a947) Mar 24 17:13:58 ip-10-0-5-186 bootkube.sh[3504]: Error: unknown flag: --cluster-version-manifest-path

  • The bootstrap script (bootkube.sh) is trying to invoke the Cluster Version Operator (CVO) cvo-render command with the flag --cluster-version-manifest-path, but the CVO binary in the release image
    doesn't recognize this flag.

@mtulio
Copy link
Copy Markdown
Contributor

mtulio commented Mar 24, 2026

/pipeline required

@openshift-ci-robot
Copy link
Copy Markdown

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

@mtulio
Copy link
Copy Markdown
Contributor

mtulio commented Mar 25, 2026

/payload-job periodic-ci-redhat-openshift-ecosystem-opct-main-4.19-platform-external-vsphere

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 25, 2026

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

@mtulio
Copy link
Copy Markdown
Contributor

mtulio commented Mar 25, 2026

/payload-job periodic-ci-openshift-release-main-nightly-4.19-e2e-aws-ovn-seria

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 25, 2026

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

@mtulio
Copy link
Copy Markdown
Contributor

mtulio commented Mar 25, 2026

/payload-job periodic-ci-openshift-release-main-nightly-4.19-e2e-aws-ovn-serial

Comment on lines +363 to +365
// Return an error if there are less schedulable worker nodes than the desired number of nodes to add to the custom MCP
if len(workerNodes) < numberOfNodes {
return nil, fmt.Errorf("Schedulable nodes in Worker MCP %d < Number of nodes needed in %s MCP %d", len(workerNodes), customMCP, numberOfNodes)
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.

Is this really an error? I would more-so consider this an environment where this test is not applicable to run and, thus, should result in a skip.

Copy link
Copy Markdown
Contributor Author

@bshaw7 bshaw7 Mar 26, 2026

Choose a reason for hiding this comment

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

Hello @isabella-janssen
Skip test instead of error when insufficient worker nodes
- Changed addWorkerNodesToCustomPool() to call g.Skip() instead of returning error
- Insufficient worker nodes is an environmental constraint, not a test failure
- Provides clearer test results for SNO/compact cluster scenarios
- Tests properly skipped with message: "Not enough schedulable worker nodes (0) for custom MCP (need 1)"

[root@vm-234-63 ~]# cat /tmp/pinnedimages-run.log| grep -i "All Nodes in a custom Pool should have the PinnedImages even after Garbage Collection"
started: 0/2/13 "[Suite:openshift/machine-config-operator/disruptive][sig-mco][OCPFeatureGate:PinnedImages][Disruptive] [Slow]All Nodes in a custom Pool should have the PinnedImages even after Garbage Collection [apigroup:machineconfiguration.openshift.io] [Serial]"
skipped: (4.2s) 2026-03-26T21:22:19 "[Suite:openshift/machine-config-operator/disruptive][sig-mco][OCPFeatureGate:PinnedImages][Disruptive] [Slow]All Nodes in a custom Pool should have the PinnedImages even after Garbage Collection [apigroup:machineconfiguration.openshift.io] [Serial]"
[root@vm-234-63 ~]# oc get node,mcp
NAME                              STATUS   ROLES                         AGE   VERSION
node/ip-10-0-14-92.ec2.internal   Ready    control-plane,master,worker   86m   v1.32.12
node/ip-10-0-5-6.ec2.internal     Ready    control-plane,master,worker   86m   v1.32.12
node/ip-10-0-68-72.ec2.internal   Ready    control-plane,master,worker   86m   v1.32.12

NAME                                                         CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
machineconfigpool.machineconfiguration.openshift.io/master   rendered-master-1930b9457ae617fdbba7667a6044cc4c   True      False      False      3              3                   3                     0                      81m
machineconfigpool.machineconfiguration.openshift.io/worker   rendered-worker-40946b8718ecc0535ed7778cad6f1e28   True      False      False      0              0                   0                     0                      81m
[root@vm-234-63 ~]# 

bshaw7 and others added 3 commits March 27, 2026 17:07
The PinnedImages conformance test was selecting worker nodes by label
only, ignoring node taints. This caused issues in environments with
dedicated/tainted nodes (e.g., OPCT test infrastructure, edge zones).

Problem:
- Test created custom MachineConfigPool targeting any worker node
- Could select nodes with NoSchedule/NoExecute taints
- In OPCT, selecting the dedicated node caused pod eviction and test failure

Solution:
- Use e2enode.GetReadySchedulableNodes() to filter nodes
- This function excludes nodes with NoSchedule/NoExecute taints
- Follows the same pattern used by other OpenShift conformance tests

Changes:
- Added import: e2enode "k8s.io/kubernetes/test/e2e/framework/node"
- Modified addWorkerNodesToCustomPool() to:
  1. Get schedulable nodes using e2enode.GetReadySchedulableNodes()
  2. Filter for worker nodes only
  3. Select from schedulable workers (excluding tainted nodes)

Testing:
- Verified node filtering logic correctly excludes tainted nodes
- Tested on cluster with dedicated OPCT node (node-role.kubernetes.io/tests:NoSchedule)
- Dedicated node correctly filtered out, test selects from 3 schedulable workers

Fixes: https://github.com/redhat-openshift-ecosystem/opct/issues/[TBD]

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…function

As suggested in code review, created a shared utility function
GetReadySchedulableWorkerNodes() in test/extended/node/node_utils.go
to encapsulate the logic of retrieving schedulable worker nodes
(excluding nodes with NoSchedule/NoExecute taints).

This makes the node selection logic reusable across multiple tests
and improves code maintainability.

Changes:
- Added GetReadySchedulableWorkerNodes() in test/extended/node/node_utils.go
- Refactored PinnedImages test to use the new utility function
- Simplified addWorkerNodesToCustomPool() by removing manual filtering logic
This commit addresses two issues raised in PR review:

1. Exclude nodes with master/control-plane role from custom MCPs
   - Created GetReadySchedulableWorkerNodes() in test/extended/util package
   - Filters out nodes that have both worker and master/control-plane labels
   - In SNO and compact clusters, nodes belong to master MCP and cannot be moved
     to custom MCPs
   - Prevents test failures when trying to assign these nodes to custom pools

2. Skip test instead of error when insufficient worker nodes
   - Changed addWorkerNodesToCustomPool() to call g.Skip() instead of returning error
   - Insufficient worker nodes is an environmental constraint, not a test failure
   - Provides clearer test results for SNO/compact cluster scenarios

3. Fix import cycle
   - Moved GetReadySchedulableWorkerNodes to util package to avoid import cycle
   - machine_config package can now safely import from util without creating cycles

Tested on compact cluster (3 nodes with worker+master+control-plane roles):
- GetReadySchedulableWorkerNodes() correctly returned 0 nodes
- Tests properly skipped with message: "Not enough schedulable worker nodes (0) for custom MCP (need 1)"

Co-Authored-By: Bikash Shaw <bshaw@redhat.com>
@bshaw7 bshaw7 force-pushed the fix/pinnedimages-respect-node-taints branch from a1174a7 to a06beca Compare March 27, 2026 11:42
@openshift-ci-robot
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Member

@isabella-janssen isabella-janssen left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 27, 2026
@bshaw7
Copy link
Copy Markdown
Contributor Author

bshaw7 commented Mar 27, 2026

/verified by CI and local tests #30913 (comment) / #30913 (comment)

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 27, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@bshaw7: This PR has been marked as verified by CI and local tests https://github.com/openshift/origin/pull/30913#issuecomment-4136591489 / https://github.com/openshift/origin/pull/30913#discussion_r2997865312.

Details

In response to this:

/verified by CI and local tests #30913 (comment) / #30913 (comment)

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.

@mtulio
Copy link
Copy Markdown
Contributor

mtulio commented Mar 27, 2026

/retest-required

@neisw
Copy link
Copy Markdown
Contributor

neisw commented Mar 27, 2026

/approve

@mtulio
Copy link
Copy Markdown
Contributor

mtulio commented Mar 28, 2026

Wake up bot for approved labels. 😄

/jira-refresh

@neisw
Copy link
Copy Markdown
Contributor

neisw commented Mar 28, 2026

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 28, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bshaw7, isabella-janssen, neisw

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 Mar 28, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 28, 2026

@bshaw7: 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.

@openshift-merge-bot openshift-merge-bot bot merged commit 28156bc into openshift:main Mar 28, 2026
21 checks passed
@openshift-ci-robot
Copy link
Copy Markdown

@bshaw7: Jira Issue Verification Checks: Jira Issue OCPBUGS-78617
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-78617 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

The PinnedImages conformance test was selecting worker nodes by label only, ignoring node taints. This caused issues in environments with dedicated/tainted nodes (e.g., OPCT test infrastructure, edge zones).

Problem:

  • Test created custom MachineConfigPool targeting any worker node
  • Could select nodes with NoSchedule/NoExecute taints
  • In OPCT, selecting the dedicated node caused Sonobuoy pod eviction and test failure.

Solution:

  • Use e2enode.GetReadySchedulableNodes() to filter nodes
  • This function excludes nodes with NoSchedule/NoExecute taints
  • Follows the same pattern used by other OpenShift conformance tests

Changes:

  • Added import: e2enode "k8s.io/kubernetes/test/e2e/framework/node"
  • Modified addWorkerNodesToCustomPool() to:
  1. Get schedulable nodes using e2enode.GetReadySchedulableNodes()
  2. Filter for worker nodes only
  3. Select from schedulable workers (excluding tainted nodes)

Testing:

  • Verified node filtering logic correctly excludes tainted nodes
  • Tested on cluster with dedicated OPCT node (node-role.kubernetes.io/tests:NoSchedule)
  • Dedicated node correctly filtered out, test selects from 3 schedulable workers

Fixes: https://redhat.atlassian.net/browse/OCPBUGS-78617

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.

@mtulio
Copy link
Copy Markdown
Contributor

mtulio commented Mar 30, 2026

/cherry-pick release-4.21 release-4.20 release-4.19

@openshift-cherrypick-robot
Copy link
Copy Markdown

@mtulio: #30913 failed to apply on top of branch "release-4.21":

Applying: Fix: PinnedImages test should respect node taints
Applying: Refactor: Extract schedulable worker nodes logic to reusable utility function
Using index info to reconstruct a base tree...
A	test/extended/node/node_utils.go
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): test/extended/node/node_utils.go deleted in HEAD and modified in Refactor: Extract schedulable worker nodes logic to reusable utility function. Version Refactor: Extract schedulable worker nodes logic to reusable utility function of test/extended/node/node_utils.go left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 Refactor: Extract schedulable worker nodes logic to reusable utility function

Details

In response to this:

/cherry-pick release-4.21 release-4.20 release-4.19

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-merge-robot
Copy link
Copy Markdown
Contributor

Fix included in accepted release 4.22.0-0.nightly-2026-03-29-055437

bshaw7 added a commit to bshaw7/origin that referenced this pull request Apr 7, 2026
Backport of OCPBUGS-78617 fix from main to release-4.21.

The PinnedImages conformance test was selecting worker nodes without
considering node taints, causing test failures in environments with
dedicated/tainted nodes (like OPCT test infrastructure).

Changes:
- Added GetReadySchedulableWorkerNodes() utility function in
  test/extended/util/nodes.go to filter out nodes with NoSchedule/NoExecute
  taints and nodes with control-plane/master roles
- Updated addWorkerNodesToCustomPool() in pinnedimages.go to use the new
  utility function
- Tests now skip gracefully when insufficient schedulable worker nodes exist
  (handles SNO and compact cluster scenarios)

This ensures the test works correctly across cluster topologies.

Original PR: openshift#30913
bshaw7 added a commit to bshaw7/origin that referenced this pull request Apr 7, 2026
Backport of OCPBUGS-78617 fix from main to release-4.20.

The PinnedImages conformance test was selecting worker nodes without
considering node taints, causing test failures in environments with
dedicated/tainted nodes (like OPCT test infrastructure).

Changes:
- Added GetReadySchedulableWorkerNodes() utility function in
  test/extended/util/nodes.go to filter out nodes with NoSchedule/NoExecute
  taints and nodes with control-plane/master roles
- Updated addWorkerNodesToCustomPool() in pinnedimages.go to use the new
  utility function
- Tests now skip gracefully when insufficient schedulable worker nodes exist
  (handles SNO and compact cluster scenarios)

This ensures the test works correctly across cluster topologies.

Original PR: openshift#30913
bshaw7 added a commit to bshaw7/origin that referenced this pull request Apr 7, 2026
Backport of OCPBUGS-78617 fix from main to release-4.19.

The PinnedImages conformance test was selecting worker nodes without
considering node taints, causing test failures in environments with
dedicated/tainted nodes (like OPCT test infrastructure).

Changes:
- Added GetReadySchedulableWorkerNodes() utility function in
  test/extended/util/nodes.go to filter out nodes with NoSchedule/NoExecute
  taints and nodes with control-plane/master roles
- Updated addWorkerNodesToCustomPool() in pinnedimages.go to use the new
  utility function
- Tests now skip gracefully when insufficient schedulable worker nodes exist
  (handles SNO and compact cluster scenarios)

This ensures the test works correctly across cluster topologies.

Original PR: openshift#30913
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/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. 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. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants