Skip to content

OCPBUGS-105802: Use the correct v1 mcfg api for OSImageStream during ignition - #9283

Open
bennerv wants to merge 1 commit into
openshift:mainfrom
bennerv:ocpbugs-105802-ignition-osimagestream-api
Open

OCPBUGS-105802: Use the correct v1 mcfg api for OSImageStream during ignition#9283
bennerv wants to merge 1 commit into
openshift:mainfrom
bennerv:ocpbugs-105802-ignition-osimagestream-api

Conversation

@bennerv

@bennerv bennerv commented Aug 12, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it:

fixes the selection of rhel-9 vs. rhel-10 in OCP 5.0 by using the api that machineconfig understands for OS Stream.

Which issue(s) this PR fixes:

Fixes OCPBUGS-105802

Special notes for your reviewer:

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes
    • Updated generated OS image stream manifests to use the stable machineconfiguration.openshift.io/v1 API version.
    • Ensures compatibility for both RHEL 9 and RHEL 10 image stream configurations.
    • Added validation to confirm guest-cluster nodes run the OS version specified by their resolved image stream.
    • Improved verification across default and explicitly configured image stream settings.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 12, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@bennerv: This pull request references Jira Issue OCPBUGS-105802, 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:

What this PR does / why we need it: fixes the selection of rhel-9 vs. rhel-10 in OCP 5.0 by using the api that machineconfig understands for OS Stream.

Which issue(s) this PR fixes:

Fixes OCPBUGS-105802

Special notes for your reviewer:

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Aug 12, 2026
@openshift-ci openshift-ci Bot added do-not-merge/needs-area area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release labels Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: c3c6a7a5-6325-4bdc-b29b-fa0cfece4ee7

📥 Commits

Reviewing files that changed from the base of the PR and between fe3bf07 and 2ff2425.

📒 Files selected for processing (1)
  • test/e2e/v2/tests/nodepool_osimagestream_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/e2e/v2/tests/nodepool_osimagestream_test.go

📝 Walkthrough

Walkthrough

The controller now generates OSImageStream manifests with API version machineconfiguration.openshift.io/v1. Unit tests cover RHEL 9 and RHEL 10 outputs. End-to-end tests resolve the expected stream and verify that ready guest-cluster nodes run the matching RHCOS major version.

Suggested reviewers: enxebre, nirshal


Important

Pre-merge checks failed

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

❌ Failed checks (1 error)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error The new mismatch diagnostic includes node.Name in an Expect failure message, which can emit an internal hostname in CI logs. Report mismatch counts and OS versions without node.Name, or redact/hash node.Name before constructing the failure message.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: using the stable v1 machine configuration API for OSImageStream during ignition.
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 The PR adds one Ginkgo It title with a static description. NodePool names and other runtime values remain in test bodies, logs, or assertions, not test titles.
Test Structure And Quality ✅ Passed The added Ginkgo coverage is read-only, uses the shared BeforeEach, has no resources requiring cleanup, uses timed Eventually/WaitForReadyNodes helpers, and includes diagnostic assertion messages.
Topology-Aware Scheduling Compatibility ✅ Passed The commit changes only the OSImageStream API version and validation tests. The diff adds no affinity, spread, replica, selector, toleration, or PDB scheduling constraints.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The added Ginkgo test reads Node and NodePool data through the hosted-cluster API and parses OS versions; it adds no IPv4 literals, IP parsing, external URLs, registry pulls, or public service access.
No-Weak-Crypto ✅ Passed The diff changes an OSImageStream API version and adds OS-version validation only; no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom crypto, or secret comparisons were introduced.
Container-Privileges ✅ Passed The PR diff changes only OSImageStream API version, tests, and read-only node checks; added lines contain no privileged, host namespace, SYS_ADMIN, root, or allowPrivilegeEscalation settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@bennerv

bennerv commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

/jira refresh

@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 Aug 12, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@bennerv: This pull request references Jira Issue OCPBUGS-105802, 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)
Details

In response to this:

/jira refresh

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

@bennerv: This pull request references Jira Issue OCPBUGS-105802, 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:

What this PR does / why we need it: fixes the selection of rhel-9 vs. rhel-10 in OCP 5.0 by using the api that machineconfig understands for OS Stream.

Which issue(s) this PR fixes:

Fixes OCPBUGS-105802

Special notes for your reviewer:

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Summary by CodeRabbit

  • Bug Fixes
  • Updated generated OS image stream manifests to use the stable machineconfiguration.openshift.io/v1 API version.
  • Ensures compatibility for both RHEL 9 and RHEL 10 image stream configurations.

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.

@bennerv
bennerv force-pushed the ocpbugs-105802-ignition-osimagestream-api branch 2 times, most recently from 352a528 to fe3bf07 Compare August 12, 2026 02:20
@bennerv

bennerv commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

/hold for personal review.

@openshift-ci openshift-ci Bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. area/testing Indicates the PR includes changes for e2e testing labels Aug 12, 2026

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 3

🤖 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/e2e/v2/tests/nodepool_osimagestream_test.go`:
- Around line 326-330: Update the comment for verifyNodeOSMatchesStream to
replace “guest cluster” with “hosted cluster,” preserving the rest of the
explanation and required V2 terminology.
- Around line 365-366: Rename the Ginkgo test description inside
NodePoolOSImageStreamNodeOSVerificationTest to follow the required “When ... it
should ...” format, while preserving its existing intent about nodes matching
the resolved osImageStream OS version.
- Around line 307-310: In the test flow surrounding verifyNodeOSMatchesStream,
call ValidateHostedClusterClient() after ValidateHostedCluster() and before
verifying node OS images. Keep the existing node validation and expectedStream
checks unchanged.
🪄 Autofix

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: 612402ec-6f14-4892-941f-429e0988239a

📥 Commits

Reviewing files that changed from the base of the PR and between c0ea1e0 and fe3bf07.

📒 Files selected for processing (1)
  • test/e2e/v2/tests/nodepool_osimagestream_test.go

Comment thread test/e2e/v2/tests/nodepool_osimagestream_test.go
Comment thread test/e2e/v2/tests/nodepool_osimagestream_test.go
Comment thread test/e2e/v2/tests/nodepool_osimagestream_test.go Outdated
The MCO removed v1alpha1 support for OSImageStream in
openshift/machine-config-operator#6076. Update the ignition server
to render the CR with the v1 API version so the MCO bootstrap
processes it correctly.
@bennerv
bennerv force-pushed the ocpbugs-105802-ignition-osimagestream-api branch from fe3bf07 to 2ff2425 Compare August 12, 2026 02:38
@csrwng csrwng added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 12, 2026
@csrwng

csrwng commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

/test security

@openshift-ci

openshift-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: bennerv

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 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.67%. Comparing base (ab71ef1) to head (2ff2425).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9283   +/-   ##
=======================================
  Coverage   45.67%   45.67%           
=======================================
  Files         781      781           
  Lines       97726    97726           
=======================================
  Hits        44641    44641           
  Misses      50019    50019           
  Partials     3066     3066           
Files with missing lines Coverage Δ
...ition-server/controllers/local_ignitionprovider.go 42.87% <100.00%> (ø)
Flag Coverage Δ
cmd-support 38.79% <ø> (ø)
cpo-hostedcontrolplane 47.84% <ø> (ø)
cpo-other 45.89% <ø> (ø)
hypershift-operator 56.97% <ø> (ø)
other 34.38% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bennerv

bennerv commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

Reason for the hold:

  • I'm not sure which e2e is actually running to test this since it's still behind a tech preview feature
  • I don't think there's a test that exercises both rhel9 and rhel10 dual streams on 5.0 to confirm the difference between nodepool versions.

need to investigate more.

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. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/testing Indicates the PR includes changes for e2e testing do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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.

3 participants