Skip to content

MGMT-21232: Use library functions to embed system ignition#669

Open
zaneb wants to merge 3 commits intoopenshift:masterfrom
zaneb:refactor-liveiso-ignition
Open

MGMT-21232: Use library functions to embed system ignition#669
zaneb wants to merge 3 commits intoopenshift:masterfrom
zaneb:refactor-liveiso-ignition

Conversation

@zaneb
Copy link
Copy Markdown
Member

@zaneb zaneb commented Mar 2, 2026

Use the assisted-image-service library to embed the system ignition in the live ISO, to avoid code duplication.

Also use it to embed the user ignition in the live ISO, so that the live ISO builder no longer depends on coreos-installer.

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

openshift-ci-robot commented Mar 2, 2026

@zaneb: This pull request references MGMT-21232 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 sub-task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Use the assisted-image-service library to embed the system ignition in the live ISO, to avoid code duplication.

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 requested review from bfournie and rwsu March 2, 2026 22:19
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Mar 2, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zaneb

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 2, 2026
@zaneb zaneb force-pushed the refactor-liveiso-ignition branch 2 times, most recently from d69941e to b2d5ead Compare March 3, 2026 03:12
@zaneb
Copy link
Copy Markdown
Member Author

zaneb commented Mar 4, 2026

/retest

@danielerez
Copy link
Copy Markdown
Contributor

/test e2e-agent-compact-ipv4-iso-no-registry

1 similar comment
@zaneb
Copy link
Copy Markdown
Member Author

zaneb commented Mar 25, 2026

/test e2e-agent-compact-ipv4-iso-no-registry

@zaneb
Copy link
Copy Markdown
Member Author

zaneb commented Mar 26, 2026

That worked except for the known issue of OCPBUGS-78476.

@zaneb zaneb force-pushed the refactor-liveiso-ignition branch 2 times, most recently from aa2b36b to 8e4f709 Compare March 30, 2026 19:59
zaneb added 3 commits March 31, 2026 08:59
Replace custom CPIO archive generation with the isoeditor library's
Archive() method to avoid code duplication and simplify the API.

The WrapIgnition function now accepts an IgnitionContent object directly
instead of performing path manipulation (truncating with Base() only to
have the library re-extend the path).

Assisted-by: Claude Code
Remove WrapIgnition() and use the isoeditor library's
NewInitRamFSStreamReaderFromISO() to append system ignition to the
initrd file. This eliminates the need to create a separate bootstrap
image and modify boot configuration files (grub.cfg, isolinux.cfg,
kargs.json).

Remove obsolete helper functions editFile() and fixKargsOffset()
and their associated constants.

Note that this will not work for s390 ISOs. The function
NewIgnitionImageReader() is designed to work for all platforms, but it
replaces the contents of the ignition embed area. For our purposes, we
need to keep the system ignition out of this area so that the regular
config.ign can be written to it in addition later.

Assisted-by: Claude Code
Introduce a new coreos.WriteIgnitionToExtractedISO() function that writes
ignition content directly to an already-extracted ISO directory using
isoeditor.NewIgnitionImageReader(). This eliminates the need to call out
to the external coreos-installer tool for embedding ignition.

Apply this to the appliance live ISO build path, where ignition is now
embedded inline during the build process (writing to the extracted
directory before isoeditor.Create()) rather than calling EmbedIgnition()
on the completed ISO afterward.

Assisted-by: Claude Code
@zaneb zaneb force-pushed the refactor-liveiso-ignition branch from 8e4f709 to 93da4e3 Compare March 30, 2026 19:59
@zaneb
Copy link
Copy Markdown
Member Author

zaneb commented Mar 30, 2026

/retest

1 similar comment
@zaneb
Copy link
Copy Markdown
Member Author

zaneb commented Apr 1, 2026

/retest

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 1, 2026

@zaneb: 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-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 2, 2026

@zaneb: This pull request references MGMT-21232 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 sub-task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Use the assisted-image-service library to embed the system ignition in the live ISO, to avoid code duplication.

Also use it to embed the user ignition in the live ISO, so that the live ISO builder no longer depends on coreos-installer.

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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants