Skip to content

MCO-2200: Add day-0 dual streams support for ABI install flow#10481

Open
isabella-janssen wants to merge 1 commit into
openshift:mainfrom
isabella-janssen:mco-2200-claude
Open

MCO-2200: Add day-0 dual streams support for ABI install flow#10481
isabella-janssen wants to merge 1 commit into
openshift:mainfrom
isabella-janssen:mco-2200-claude

Conversation

@isabella-janssen
Copy link
Copy Markdown
Member

@isabella-janssen isabella-janssen commented Apr 8, 2026

Note that much of this PR was created with Claude.

Summary by CodeRabbit

  • New Features

    • Agent-based installations now support configurable OS image streams (rhel-9, rhel-10) and will adapt selection based on install configuration and workflow type.
    • Minimal ISO generation now incorporates optional install configuration when resolving root filesystem sources.
  • Tests

    • Expanded tests for OS image stream validation.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: efaea238-f210-4e7b-b2b5-14e7a976a42a

📥 Commits

Reviewing files that changed from the base of the PR and between 5c23add and 73ee43d.

📒 Files selected for processing (7)
  • pkg/asset/agent/image/agentimage.go
  • pkg/asset/agent/image/baseiso.go
  • pkg/asset/agent/image/ignition.go
  • pkg/asset/agent/manifests/agent.go
  • pkg/asset/agent/manifests/agent_test.go
  • pkg/asset/manifests/osimagestream.go
  • pkg/types/validation/installconfig_test.go
🚧 Files skipped from review as they are similar to previous changes (5)
  • pkg/asset/agent/image/agentimage.go
  • pkg/asset/agent/manifests/agent_test.go
  • pkg/asset/manifests/osimagestream.go
  • pkg/asset/agent/image/ignition.go
  • pkg/types/validation/installconfig_test.go

Walkthrough

Assets for agent-driven installs now accept an optional install configuration and agent workflow info; this is threaded into OS image stream selection and rootFS URL resolution, and OSImageStream manifest generation is conditionally suppressed for non-install agent workflows.

Changes

Cohort / File(s) Summary
Agent image assets
pkg/asset/agent/image/agentimage.go, pkg/asset/agent/image/baseiso.go, pkg/asset/agent/image/ignition.go
Added agent.OptionalInstallConfig dependency and instantiate/pass installConfig into dependencies.Get(...). getRootFSURL and customStreamGetter now accept installConfig to select OS image streams (including an RHCOS fetch path using installConfig.Config.OSImageStream).
Agent manifests asset & tests
pkg/asset/agent/manifests/agent.go, pkg/asset/agent/manifests/agent_test.go
Declared dependency on manifests.OSImageStream, included it in generation loop, and updated tests to include the optional OSImageStream asset.
OSImageStream manifest logic
pkg/asset/manifests/osimagestream.go
Added dependencies on agent.OptionalInstallConfig and workflow.AgentWorkflow. Generate selects config from IPI InstallConfig or agent OptionalInstallConfig, and only produces manifests when appropriate (IPI or agent workflow == Install); otherwise returns nil.
Validation tests
pkg/types/validation/installconfig_test.go
Removed duplicated invalid-OSImageStream test entry and adjusted remaining test entries (global SCOS state handling simplified/changed).

Sequence Diagram(s)

sequenceDiagram
    participant AgentManifests
    participant OSImageStream
    participant InstallConfig
    participant AgentWorkflow
    participant RHCOSFetcher

    AgentManifests->>OSImageStream: Generate()
    OSImageStream->>InstallConfig: Ask for IPI InstallConfig
    alt IPI InstallConfig present
        InstallConfig-->>OSImageStream: Provide IPI config (OSImageStream)
        OSImageStream->>RHCOSFetcher: Use OSImageStream to fetch metadata
        RHCOSFetcher-->>OSImageStream: Return image stream / metadata
        OSImageStream-->>AgentManifests: Return manifest
    else No IPI config, agent OptionalInstallConfig present
        OSImageStream->>InstallConfig: Check agent OptionalInstallConfig
        alt AgentWorkflow == Install
            AgentWorkflow-->>OSImageStream: Confirm Install workflow
            OSImageStream->>RHCOSFetcher: Use agent OSImageStream to fetch metadata
            RHCOSFetcher-->>OSImageStream: Return image stream / metadata
            OSImageStream-->>AgentManifests: Return manifest
        else Other agent workflow
            OSImageStream-->>AgentManifests: Return nil (no manifest)
        end
    else No config available
        OSImageStream-->>AgentManifests: Return nil (no manifest)
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 8 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Structure And Quality ❓ Inconclusive The custom check targets Ginkgo test patterns, but the modified test files use standard Go table-driven tests without any Ginkgo constructs. Clarify whether this check applies only to Ginkgo tests or should also cover standard Go tests; if the latter, add descriptive failure messages to all assertions.
✅ Passed checks (8 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding day-0 dual streams support for ABI (Agent-Based Installation) install flow, which aligns with the changeset's focus on enabling OSImageStream configuration across agent image and manifest assets.
Stable And Deterministic Test Names ✅ Passed All test names in modified test files are static, descriptive strings without dynamic content like UUIDs, timestamps, or pod/node names.
Microshift Test Compatibility ✅ Passed This PR contains only standard Go unit tests using the testing package, not Ginkgo e2e tests.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR does not add any Ginkgo e2e tests. Modified test files contain only standard Go unit tests using the testing package and testify assertions. Changes are limited to extending existing unit test coverage by adding the OSImageStream asset to test inputs and adding a new validation test case. No Ginkgo constructs like Describe(), It(), Context(), or When() are present in modified source files.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies asset generators for agent-based installation (ISO, ignition, OS image stream config) without introducing topology-dependent pod scheduling constraints.
Ote Binary Stdout Contract ✅ Passed PR modifies installer asset definition files, not OTE test binaries. No process-level code or stdout writes found.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR does not add new Ginkgo e2e tests; only standard Go unit tests with no Ginkgo patterns detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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


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

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 8, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Apr 8, 2026

@isabella-janssen: This pull request references MCO-2200 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Note that much of this PR was created with Claude.

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

openshift-ci Bot commented Apr 8, 2026

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

Comment thread data/data/install.openshift.io_installconfigs.yaml Outdated
Comment thread pkg/rhcos/stream.go Outdated
Comment thread pkg/asset/agent/image/baseiso.go Outdated
Comment thread pkg/asset/agent/image/baseiso_test.go Outdated
Comment thread pkg/asset/manifests/osimagestream.go Outdated
@isabella-janssen isabella-janssen force-pushed the mco-2200-claude branch 3 times, most recently from 82f8861 to 5c23add Compare April 14, 2026 18:08
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Apr 14, 2026

@isabella-janssen: This pull request references MCO-2200 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Note that much of this PR was created with Claude.

Summary by CodeRabbit

  • New Features

  • Agent-based installations now support configurable OS image streams (rhel-9, rhel-10) for greater flexibility in OS selection

  • OS image selection logic improved to intelligently adapt based on installation configuration and workflow type

  • Tests

  • Expanded test coverage for OS image stream validation and error handling

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/types/validation/installconfig_test.go`:
- Around line 3038-3043: The restoreFnFactory in the test sets types.SCOS =
false unconditionally and must instead capture the original value and restore it
after the test; update the restoreFnFactory closure to save orig := types.SCOS,
then return a func() that sets types.SCOS = orig so the test (and parallel
tests) do not mutate global state permanently—apply this change to the
restoreFnFactory used alongside expectedError in the InstallConfig tests.
🪄 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: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7510ad2f-b046-42cd-9a85-96a75689d6f4

📥 Commits

Reviewing files that changed from the base of the PR and between 075b809 and 5c23add.

📒 Files selected for processing (7)
  • pkg/asset/agent/image/agentimage.go
  • pkg/asset/agent/image/baseiso.go
  • pkg/asset/agent/image/ignition.go
  • pkg/asset/agent/manifests/agent.go
  • pkg/asset/agent/manifests/agent_test.go
  • pkg/asset/manifests/osimagestream.go
  • pkg/types/validation/installconfig_test.go

Comment thread pkg/types/validation/installconfig_test.go
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Apr 14, 2026

@isabella-janssen: This pull request references MCO-2200 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Note that much of this PR was created with Claude.

Summary by CodeRabbit

  • New Features

  • Agent-based installations now support configurable OS image streams (rhel-9, rhel-10) and will adapt selection based on install configuration and workflow type.

  • Minimal ISO generation now incorporates optional install configuration when resolving root filesystem sources.

  • Bug Fixes

  • OS image stream generation is suppressed for non-install agent workflows to avoid inappropriate outputs.

  • Tests

  • Expanded tests for OS image stream validation and error handling.

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 openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 17, 2026
Comment thread pkg/asset/manifests/osimagestream.go Outdated
Comment thread pkg/asset/agent/image/baseiso.go Outdated
}

// For install workflow, use osImageStream from install-config if supplied
if installConfig.Supplied && installConfig.Config != nil {
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.

The original motivation of the customStreamGetter was to provide an alternative (custom) way to retrieve the bootimages data - because in the day2 add scenario we wanted to reuse the values found in the target cluster (from the coreos-bootimages configmap) rather than the "default" values embedded in the installer.
This approach technically works, but I was expecting an implementation more focused on the defaultCoreOSStreamGetter (or at least part of GetMetalArtifact). I understand that it may be more complex from an implementation point of view, but I was wondering if it could be worth rethinking that part so that the OSImageStream field could be considered a part of the default implementation, rather than a special custom one (based on writing a dedicated asset for that)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I tried integrating the suggestion here to have the implementation more focused in GetMetalArtifact, so hopefully the current state of this PR is closer to what you were expecting.

@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 17, 2026
@pablintino
Copy link
Copy Markdown
Contributor

Hey @isabella-janssen! Just one thing based on the discussions we have had with the AS folks.
We need to add the osImageStream field to this struct and initialize it.

icOverrides := agentClusterInstallInstallConfigOverrides{}

@isabella-janssen
Copy link
Copy Markdown
Member Author

/test ?

@isabella-janssen
Copy link
Copy Markdown
Member Author

/test verify-codegen

@isabella-janssen
Copy link
Copy Markdown
Member Author

/test gofmt

@isabella-janssen
Copy link
Copy Markdown
Member Author

/test golint

@isabella-janssen
Copy link
Copy Markdown
Member Author

isabella-janssen commented Apr 20, 2026

/test golint
/test verify-codegen
/test golint

@isabella-janssen isabella-janssen force-pushed the mco-2200-claude branch 2 times, most recently from 7b76730 to e2aedd3 Compare April 21, 2026 12:35
@isabella-janssen
Copy link
Copy Markdown
Member Author

/test all

@isabella-janssen
Copy link
Copy Markdown
Member Author

/retest-required

@isabella-janssen isabella-janssen marked this pull request as ready for review April 21, 2026 18:20
@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 Apr 21, 2026
@andfasano
Copy link
Copy Markdown
Contributor

/approve
/hold

from the (ABI) integration point of view the current changes looks fine to me. Holding the PR for any other feedback from @zaneb , and for some green TP 10 runs

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 20, 2026
@andfasano
Copy link
Copy Markdown
Contributor

/test ?

@andfasano
Copy link
Copy Markdown
Contributor

/test e2e-agent-compact-ipv4-rhel10-techpreview
/test e2e-agent-ha-dualstack-rhel10-techpreview
/test e2e-agent-sno-ipv6-rhel10-techpreview

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 20, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andfasano

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 May 20, 2026
Copy link
Copy Markdown
Member

@zaneb zaneb left a comment

Choose a reason for hiding this comment

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

This looks basically good. I think we just want to set the default in the defaults rather than at all the places it is used... if that is in fact the thing we want for all install types (which does seem plausible! the most surprising thing is that this wasn't already the case).
/hold cancel

Comment thread pkg/asset/installconfig/aws/validation.go Outdated
Comment thread pkg/asset/rhcos/iso_test.go Outdated
@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 20, 2026
@bfournie
Copy link
Copy Markdown
Contributor

bfournie commented May 21, 2026

Looking at the e2e-agent-compact-ipv4-rhel10-techpreview test, it succeeds through installation and writes images to disk and then fails with a node-image-overlay.service issue.

level=debug msg=Host master-0: updated status from installing-in-progress to error (Failed - service node-image-overlay.service failed)
level=debug msg=Host: master-0, reached installation stage Failed: service node-image-overlay.service failed

It looks like its pulling /etc onto the live system's /etc and fails because /etc/crypto-policies/back-ends/ is read-only.
May 20 04:27:04 master-0 service[4042]: > \\\"/usr/share/crypto-policies/DEFAULT/sequoia.txt\\\" failed: Read-only file system (30)\\nMay 20 08:27:01 master-0 node-image-overlay.sh[7732]: rsync: [receiver] rename \\\"/etc/crypto-policies/.config.psA00D\\

I assume that this is being worked on in mco and as such shouldn't hold up this PR.

It also looks like Zane's comment here will be addressed in #10533.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 21, 2026
Comment thread pkg/asset/rhcos/releaseextract.go
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label May 26, 2026
@zaneb
Copy link
Copy Markdown
Member

zaneb commented May 26, 2026

The e2e-agent-compact-ipv4-rhel10-techpreview issue is https://redhat.atlassian.net/browse/OCPBUGS-64660

Comment thread pkg/asset/agent/manifests/agentclusterinstall.go Outdated
config.PullSecret,
config.MirrorConfig,
))
), rhcos.DefaultOSImageStream)
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.

In baremetal IPI, the ISO that is used to provision the baremetal bootstrap VM is also the one that is used to boot the control plane hosts with ironic - we don't download an ISO but literally use /dev/cdrom or whatever it is. So ultimately the stream to use here needs to be obtained from the install-config as well.

This PR is about ABI so we shouldn't try to fix that here, just noting that we need to make sure this is tracked by another ticket.
/cc @honza

@openshift-ci openshift-ci Bot requested a review from honza May 26, 2026 21:14
Comment thread pkg/asset/agent/manifests/agentclusterinstall.go Outdated
This change enables support for RHEL 10 (coreos10-) and RHEL 9 (coreos-)
file path differentiation in machine-os-images container and throughout
the agent installer workflow.

Changes:
- Add OSImageStream field to installConfigOverrides in AgentClusterInstall
- Add stream-aware helper functions for file paths in releaseextract.go
- Update ReleasePayload interface and BaseIso to accept osImageStream parameter
- Update GetMetalArtifact to use osImageStream for FetchCoreOSBuild calls
- Add GetOSImageStream() method to AgentManifests following existing patterns
- Update getHashFromInstaller() to accept and use osImageStream parameter
- Fix test to use explicit OSImageStream value instead of empty string
- Rely on SetInstallConfigDefaults() to provide default osImageStream value

This implements the foundation for RHEL 10 support in the agent installer
by allowing the installer to distinguish between RHEL 9 and RHEL 10 boot
artifacts based on the osImageStream annotation.

Depends on openshift#10570 which sets the default OSImageStream centrally.
@dkhater-redhat
Copy link
Copy Markdown

dkhater-redhat commented May 27, 2026

@zaneb PTAL - got unit test to pass

@dkhater-redhat
Copy link
Copy Markdown

/test e2e-agent-compact-ipv4-rhel10-techpreview
/test e2e-agent-ha-dualstack-rhel10-techpreview
/test e2e-agent-sno-ipv6-rhel10-techpreview

Copy link
Copy Markdown
Member

@zaneb zaneb left a comment

Choose a reason for hiding this comment

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

/lgtm

icOverrides.AdditionalTrustBundlePolicy = installConfig.Config.AdditionalTrustBundlePolicy
}

if installConfig.Config.OSImageStream != rhcos.DefaultOSImageStream && installConfig.Config.OSImageStream != "" {
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.

nit: I don't think it can ever be "" because we set it by default now.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 27, 2026
@zaneb
Copy link
Copy Markdown
Member

zaneb commented May 27, 2026

/test e2e-aws-ovn
/test e2e-agent-compact-ipv4

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 28, 2026

@isabella-janssen: The following tests 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-aws-ovn-fips 7413a6f link false /test e2e-aws-ovn-fips
ci/prow/e2e-aws-ovn-single-node 7413a6f link false /test e2e-aws-ovn-single-node
ci/prow/e2e-vsphere-ovn-hybrid-env 7413a6f link false /test e2e-vsphere-ovn-hybrid-env
ci/prow/e2e-nutanix-ovn 7413a6f link false /test e2e-nutanix-ovn
ci/prow/e2e-azurestack 7413a6f link false /test e2e-azurestack
ci/prow/e2e-aws-ovn-edge-zones 7413a6f link false /test e2e-aws-ovn-edge-zones
ci/prow/e2e-vsphere-ovn-devpreview 7413a6f link false /test e2e-vsphere-ovn-devpreview
ci/prow/e2e-aws-ovn-heterogeneous 7413a6f link false /test e2e-aws-ovn-heterogeneous
ci/prow/e2e-agent-two-node-fencing-ipv4 6c9972c link false /test e2e-agent-two-node-fencing-ipv4
ci/prow/e2e-metal-ovn-two-node-fencing 6c9972c link false /test e2e-metal-ovn-two-node-fencing
ci/prow/e2e-aws-ovn 6c9972c link true /test e2e-aws-ovn
ci/prow/e2e-metal-ipi-ovn-virtualmedia 6c9972c link false /test e2e-metal-ipi-ovn-virtualmedia
ci/prow/e2e-agent-compact-ipv4-rhel10-techpreview 6c9972c link false /test e2e-agent-compact-ipv4-rhel10-techpreview
ci/prow/e2e-agent-compact-ipv4-appliance-diskimage 6c9972c link false /test e2e-agent-compact-ipv4-appliance-diskimage
ci/prow/e2e-metal-single-node-live-iso 6c9972c link false /test e2e-metal-single-node-live-iso

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.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants