NO-ISSUE: Fix pre-OS Image Stream OS validation for OKD clusters - #31617
NO-ISSUE: Fix pre-OS Image Stream OS validation for OKD clusters#31617sarthakpurohit wants to merge 1 commit into
Conversation
The validatePreOSImageStreamsNodeOS function hardcodes an assertion that pre-OS Image Stream clusters should use RHEL CoreOS 9 nodes. However, OKD SCOS clusters use CentOS Stream CoreOS 10 even in pre-OS Image Stream releases (4.22 and earlier). This causes the [sig-ci] [Early] prow job name should match os version test to fail deterministically on every OKD SCOS 4.22 -> 5.0 upgrade job (aws-upgrade-minor), because the [Early] tests run against the 4.22 cluster before the upgrade begins. The 4.22 OKD nodes report "CentOS Stream CoreOS 10" but the test asserts "CoreOS 9.". The actual cluster upgrade succeeds — this is purely a test assertion bug in the pre-OSImageStream fallback path. PR openshift#31487 (ff28c75) correctly added OKD detection and set targetStream = "centos-10", but did not update the validatePreOSImageStreamsNodeOS fallback which is reached when the OSImageStream CR does not exist (i.e., all pre-4.23 clusters). This change passes the isOKD flag into validatePreOSImageStreamsNodeOS so it expects CentOS Stream CoreOS 10 for OKD clusters. Signed-off-by: Sarthak Purohit <sapurohi@redhat.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@sarthakpurohit: This pull request explicitly references no jira issue. DetailsIn response to this:
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe pre-OS Image Stream node validation now receives the detected OKD status. It expects RHEL CoreOS 9 for OCP and CentOS Stream CoreOS 10 for OKD. ChangesPre-OS Image Stream validation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Pre-OS Image Stream validation now recognizes CentOS Stream CoreOS 10 on OKD while retaining the CoreOS 9 expectation for OCP, preventing the incorrect OKD early-job failure without affecting cluster upgrades. Suggested reviewers: 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sarthakpurohit The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Scheduling required tests: |
|
/override-sticky ci/prow/e2e-vsphere-ovn Automated triage: This failure appears unrelated to the PR changes. Job classification: Eligible long-running presubmit vSphere OVN end-to-end job. The definition uses the Revision check: Run SHA Execution status: Tests executed. The run completed the e2e suite for Completed supporting jobs: Overlap assessment: The PR changes only Missing-coverage risk: Low for this PR. The job ran the full long-running e2e suite and exercised the relevant coverage; the sole blocking failure is the recurring router external-certificate condition race, while 2344 tests passed. The sibling vSphere OVN UPI e2e job also passed. Rationale: The exact condition mismatch and timeout signature recur in unrelated CI runs and are consistent with a known router reconciliation race after external-certificate secret deletion, not with the PR's OS-image validation change. Override is appropriate for this unrelated failure. If you disagree with this assessment, rerun the current job with AI-generated. Review for accuracy. |
|
@redhat-chai-bot: Overrode contexts on behalf of redhat-chai-bot: ci/prow/e2e-vsphere-ovn These overrides will persist across retests on the current HEAD SHA. Pushing a new commit will clear them. Use DetailsIn response to this:
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. |
|
@sarthakpurohit: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Problem
The
validatePreOSImageStreamsNodeOSfunction intest/extended/ci/job_names.gohardcodes an assertion that pre-OS Image Stream clusters should use RHEL CoreOS 9 nodes ("CoreOS 9."). However, OKD SCOS clusters use CentOS Stream CoreOS 10 even in pre-OS Image Stream releases (4.22 and earlier).This causes the
[sig-ci] [Early] prow job name should match os versiontest to fail deterministically on every OKD SCOSaws-upgrade-minorjob (4.22 → 5.0 upgrade):The
[Early]tests run BEFORE the upgrade against the 4.22 OKD SCOS cluster, which uses CentOS Stream CoreOS 10. The test then hits the pre-OSImageStream code path (since 4.22 < 4.23 and OSImageStream CR does not exist), which unconditionally expects CoreOS 9.The actual cluster upgrade itself succeeds — this is purely a test assertion bug.
Root Cause
PR #31487 (
ff28c753e9) correctly added OKD detection and settargetStream = "centos-10"for the OSImageStream-enabled code path. However, it did not update thevalidatePreOSImageStreamsNodeOSfallback, which is reached when:OSImageStreamCR does not exist (all pre-4.23 clusters), ANDThis fallback unconditionally asserts
"CoreOS 9."regardless of whether the cluster is OKD.Fix
Pass the
isOKDflag intovalidatePreOSImageStreamsNodeOSso it expects:"CentOS Stream CoreOS 10"for OKD SCOS clusters"CoreOS 9."for OCP clusters (unchanged behavior)Evidence
Confirmed on multiple failing nightly runs:
Tests binary
5.0.0-202609050031.p2.g6bffdda(Sep 5 build, includes PR #31487) still fails, confirming the fix is incomplete.Cherry-pick Plan
After merge to
main, cherry-pick torelease-5.0is needed (the 5.0 OKD nightlyaws-upgrade-minorjob is the one failing)./cc @pablintino
Summary by CodeRabbit