Skip to content

ocp4_workload_openshift_virtualization: fix common boot image import on HCO 4.22 / OCP 5.0 - #182

Merged
agonzalezrh merged 1 commit into
mainfrom
jm-fix-enable-common-boot-image-import
Sep 22, 2026
Merged

agonzalezrh merged 1 commit into
mainfrom
jm-fix-enable-common-boot-image-import

Conversation

@juliaaano

Copy link
Copy Markdown
Contributor

What

When ocp4_workload_openshift_virtualization_boot_sources_snapshot: false (the path used on external-ODF/Ceph clusters), the role re-enables common boot image import by patching .spec.featureGates.enableCommonBootImageImport: true. This changes that final patch — and the matching comment — to the top-level .spec.enableCommonBootImageImport: true.

Why

On HCO 4.22 (OpenShift 5.0) the enableCommonBootImageImport setting was promoted from .spec.featureGates to the top-level .spec. Writing the deprecated featureGates sub-field is a silent no-op there, so the "re-enable" step never takes effect and the HyperConverged is left with common boot image import disabled — no golden-image DataSources (RHEL/Fedora/CentOS) are imported.

Observed on a live OCP 5.0 (HCO v4.22.9) deploy: after the role ran, .spec.enableCommonBootImageImport was unset and no DataImportCrons existed until the flag was manually toggled in the console. On OCP 4.21 (HCO v4.21) the old featureGates path still works, so the regression only appears on 4.22+.

The role's HyperConverged template already writes the top-level field (.spec.enableCommonBootImageImport), so this makes the re-enable patch consistent with the template. The top-level field exists on 4.21 as well, so the change is backward compatible.

🤖 Generated with Claude Code

…mport via top-level spec field

The boot_sources_snapshot=false path (external ODF/Ceph) re-enables common
boot image import by patching the deprecated
.spec.featureGates.enableCommonBootImageImport. On HCO 4.22 (OpenShift 5.0)
that field is a no-op — the setting was promoted to the top-level
.spec.enableCommonBootImageImport — so import silently stays off and no
golden images are imported. The role's own HyperConverged template already
writes the top-level field, so this aligns the re-enable patch with the
template and works on both 4.21 and 4.22+.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@agonzalezrh agonzalezrh 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.

lgtm

@agonzalezrh
agonzalezrh merged commit 2077ed1 into main Sep 22, 2026
1 check passed
@agonzalezrh
agonzalezrh deleted the jm-fix-enable-common-boot-image-import branch September 22, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants