← Back to Pull requests

Support CentOS Stream 9 and 10 builds with CI provider selection #4348

Open
pelefant opened this pull request with 5134 lines diff across 30 files
View on GitHub
pelefant pelefant commented on Nov 17, 2026 12:36 UTC
Author

<!-- Thanks for sending a pull request! Here are some tips for you:
1. Follow the instructions for writing a release note from k8s: https://git.k8s.io/community/contributors/guide/release-notes.md
-->

What this PR does / why we need it:

Add support for building CDI images with CentOS Stream 9 or 10. CS9 remains the default for local builds, while automation/test.sh selects the stream based on the kubevirtci provider: CS10 for k8s-1.37 and later, CS9 otherwise. An explicit CDI_CENTOS_STREAM_VERSION overrides the automatic selection.

CDI_CENTOS_STREAM_VERSION=10 selects the CS10 builder. Build scripts pass --config=cs10 to select the EL10 RPM trees through aliases in bazel/centos_stream and the GCC 14 s390x cross toolchain. Direct Bazel invocations through the wrapper must also include --config=cs10.

The existing EL9 RPM rules and trees are preserved. CS9 and CS10 use separate persistent builder containers and volumes. Existing CS9 container and volume names remain unchanged.

Bump bazeldnf from v0.5.9 to v0.99.1 for zstd-compressed repository metadata. Load its rules directly from @bazeldnf//bazeldnf to bypass the broken root shim.

Use EPEL 10 for python3-pycurl on x86_64 and aarch64. Explicitly select openssl-fips-provider in all CS10 RPM trees and crun in the CS10 testimage trees.

Fix nested Buildah builds in the functional test registry. CS10 test images ship Buildah 1.45 (CS9 ships 1.43), and the k8s-1.37 CI lanes now build them. Use the vfs storage driver without relying on /etc/containers/storage.conf, and place temporary build-context data on the shared volume to avoid the overlay mount issue described in Buildah #6892. The fix was validated on CS10 and CS9.

Explicitly include gzip in the CS10 test images, required by the VDDK simulator to extract its binaries. Regenerate the CS10 RPM dependency trees, including updated package versions from the current CentOS Stream repositories. CS9 dependencies remain unchanged. The new rpm() rules get builddeps mirror URLs from periodic-kubevirt-mirror-uploader after merge, like the other CS10 rules.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

Part of CNV-98989: runtime images EL10 and CS9/CS10 build selection.

Special notes for your reviewer:

Validation was performed locally with Podman:

| Configuration | Validation |
| --- | --- |
| CS9 x86_64 | bazeldnf bootstrap and four RPM layers built through aliases; layer checksums match the baseline |
| CS9 aarch64 and s390x | Cross builds of importer, uploadserver and base images; ELF architecture and version requirements inspected |
| CS10 x86_64 | All 22 images in the publication set built |
| CS10 aarch64 | All 18 images in the publication set built; OCI platform metadata checked |
| CS10 s390x | All 17 images in the publication set built; OCI platform metadata checked |
| CS10 RPM layers | All 12 trees built |
| CS10 cross ABI | Loader, architecture and required symbol versions checked against direct library dependencies in the importer and uploadserver RPM layers |
| Both streams | in-docker.sh executed successfully |
| Stream detection | detect_centos_stream_version checked with k8s-1.36, k8s-1.37, k8s-1.38, external, kind-1.37, openshift, empty providers, and explicit CS9/CS10 overrides |
| CS9 kubevirtci (k8s-1.35, amd64) | make cluster-sync passed; CDI Deployed; all CDI and test infrastructure pods Ready, including the functional test registry |
| CS10 kubevirtci (k8s-1.37, amd64) | make cluster-sync passed; CDI Deployed; all CDI and test infrastructure pods Ready; controller runtime verified as CentOS Stream 10 |

The functional test registry successfully built and pushed its test images with the updated Buildah configuration on both CS9 and CS10. The full CDI functional suite was not run locally.

Additional CS10 amd64 checks passed:

  • QEMU create/check/convert in importer and uploadserver.

  • nbdkit-curl reads of raw, xz and gzip fixtures using file://, with byte-for-byte output comparison.

  • Importer HTTP and HTTPS imports of raw and qcow2 fixtures, with byte-for-byte output comparison and successful termination messages.

  • HTTPS imports with a custom CA, including nbdkit-curl validation, and rejection of an untrusted CA by the Go HTTP client.

  • Python imports for PycURL and oVirt, and startup checks for crun and buildah.
  • The HTTP/HTTPS importer tests transferred the disk data through the Go HTTP client and converted it locally through scratch. They do not demonstrate bulk disk transfer through nbdkit over HTTP/HTTPS.

    All 560 EL9 RPM rules and 15 EL9 trees remain unchanged. Some EL9 rules appear as removed and re-added in the WORKSPACE diff due to rule ordering; their content is unchanged. Final RPM regeneration produced identical generated files, and the importer build passed after removing the unused action_env.

    The EPEL 10 key fingerprint 7D8D15CBFC4E62688591FB2633D98517E37ED158 was verified against https://fedoraproject.org/security/. Both pinned python3-pycurl RPMs passed checksum and rpmkeys --checksig verification with that key.

    Implementation and scope notes:

  • bazeldnf v0.99.1 is a prerelease. Load consolidation in WORKSPACE is formatter output.

  • The 405 new CS10 rpm() rules and the new bazeldnf archive do not have builddeps mirror URLs yet. They are covered by periodic-kubevirt-mirror-uploader, which processes CDI's WORKSPACE on main after merge.

  • Both wrappers now check the builder userspace version, including for CS9. This starts an additional short-lived container.

  • The Bazel wrapper now rejects an existing server whose image ID differs from the requested builder image.

  • Selecting openssl-fips-provider does not establish FIPS validation.

  • Cross ABI checks cover direct dependencies only. Native or emulated execution on aarch64/s390x has not been performed.

  • Docker-specific wrapper behavior has not been tested.

  • Existing CI jobs use CS10 with k8s-1.37 or later and CS9 with older k8s-* or other providers, unless explicitly overridden. This PR does not add new CI lanes, change the default stream for local builds, or switch the published images to CS10. CS9 CI coverage currently comes from the k8s-1.36 lanes; if those lanes move to a newer provider before CS9 support ends, at least one lane should explicitly set CDI_CENTOS_STREAM_VERSION=9 to retain CS9 coverage.

  • The legacy bazel-build-images.sh references //:test-container-images, which is already absent in the base commit. The image matrix above was built using the image targets referenced by the publication rules.
  • Release note:
    <!-- Write your release note:
    1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string "action required".
    2. If no release note is required, just write "NONE".
    -->
    ``release-note
    NONE
    ``

    Diff: 5134 lines (+4969 / -165) across 30 files Reviewer: awels Review duration: 22572m
    All Vouch review confidence checks passed
    Residual risk 0.09 = Change Risk (0.72) × (1 − Review Confidence (0.88)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.72 · 5134 lines diff across 30 files
    0.72
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.84 · 5 substantive comment(s)
    0.84
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    87%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.400
    Mass File Touch mass_file_touch
    0.080
    Real PR Conversation Timeline
    32 items
    kubevirt-prow[bot] kubevirt-prow[bot] commented on Nov 17, 2026 12:36 UTC
    Bot

    Hi @pelefant. Thanks for your PR.

    PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

    I understand the commands that are listed here.

    <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.
    </details>

    davmarro davmarro commented on Nov 17, 2026 13:58 UTC
    Contributor

    /ok-to-test

    davmarro davmarro commented on Nov 17, 2026 13:58 UTC
    Contributor

    /cc @davmarro @akalenyu @awels

    davmarro davmarro commented on Nov 18, 2026 14:32 UTC
    Contributor

    /ok-to-test

    davmarro davmarro commented on Nov 18, 2026 14:33 UTC
    Contributor

    /test all

    coveralls coveralls commented on Nov 18, 2026 14:43 UTC
    Contributor

    ![Coverage Status](https://coveralls.io/builds/83278843)

    coverage: 50.92% (+0.002%) from 50.918% — pelefant:cnv-98989-cs9-cs10-selector into kubevirt:main

    dsanatar dsanatar commented on Nov 23, 2026 14:43 UTC
    Contributor

    /cc

    dsanatar dsanatar commented on Nov 23, 2026 14:44 UTC
    Contributor

    /test all

    davmarro davmarro commented on Nov 23, 2026 15:53 UTC
    Contributor

    /test all

    akalenyu akalenyu commented on code on Nov 23, 2026 16:02 UTC
    Code Review
    automation/ceph-wffc.sh:1
    @@ -18,7 +18,7 @@
     #
     
     set -ex
    -export TARGET=k8s-1.36
    +export TARGET=k8s-1.37

    Do we actually care about the version of centos running on the k8s node? Would e.g. C10s userspace tested on C9 node not be good enough for us?

    davmarro davmarro commented on Nov 23, 2026 16:19 UTC
    Contributor

    /test all

    pelefant pelefant commented on code on Nov 23, 2026 16:22 UTC
    Code Review
    automation/ceph-wffc.sh:1
    @@ -18,7 +18,7 @@
     #
     
     set -ex
    -export TARGET=k8s-1.36
    +export TARGET=k8s-1.37

    Good point. CDI doesn't really need a CS10 node to test the CS10 userspace. The images only share the node kernel.
    I picked k8s-1.37 just to follow what KubeVirt does, so both the node and the images are CS10.

    For the Ceph WFFC lane we can keep k8s-1.36 and set CDI_CENTOS_STREAM_VERSION=10 explicitly. Same CS10 coverage on Ceph, no provider change.

    Would you prefer that for this lane?

    davmarro davmarro commented on Nov 24, 2026 09:35 UTC
    Contributor

    /test all

    pelefant pelefant commented on Nov 24, 2026 09:47 UTC
    Author

    /retest

    kubevirt-prow[bot] kubevirt-prow[bot] commented on Nov 24, 2026 09:47 UTC
    Bot

    @pelefant: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

    <details>

    In response to this:

    >/retest

    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.
    </details>

    davmarro davmarro commented on Nov 24, 2026 09:51 UTC
    Contributor

    /test pull-containerized-data-importer-fossa

    pelefant pelefant commented on Nov 24, 2026 09:51 UTC
    Author

    /test pull-containerized-data-importer-fossa

    kubevirt-prow[bot] kubevirt-prow[bot] commented on Nov 24, 2026 09:51 UTC
    Bot

    @pelefant: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

    <details>

    In response to this:

    >/test pull-containerized-data-importer-fossa

    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.
    </details>

    akalenyu akalenyu commented on code on Nov 24, 2026 10:55 UTC
    Code Review
    automation/ceph-wffc.sh:1
    @@ -18,7 +18,7 @@
     #
     
     set -ex
    -export TARGET=k8s-1.36
    +export TARGET=k8s-1.37

    I guess there's nothing to lose though. For the wffc lane we could decide to do 1.37 and have complete 10 coverage, in parity with kubevirt

    akalenyu akalenyu commented on code on Nov 24, 2026 11:29 UTC
    Code Review
    automation/ceph-wffc.sh:1
    @@ -18,7 +18,7 @@
     #
     
     set -ex
    -export TARGET=k8s-1.36
    +export TARGET=k8s-1.37
    pelefant pelefant commented on code on Nov 24, 2026 12:32 UTC
    Code Review
    automation/ceph-wffc.sh:1
    @@ -18,7 +18,7 @@
     #
     
     set -ex
    -export TARGET=k8s-1.36
    +export TARGET=k8s-1.37

    Makes sense, thanks! I'll revert the ceph-wffc change from this PR and leave the lane matrix to #4368

    davmarro davmarro commented on Nov 24, 2026 13:55 UTC
    Contributor

    /test all

    davmarro davmarro commented on Nov 25, 2026 09:40 UTC
    Contributor

    /test all

    davmarro davmarro commented on Nov 25, 2026 15:01 UTC
    Contributor

    /test pull-containerized-data-importer-e2e-upg

    davmarro davmarro commented on Dec 02, 2026 07:58 UTC
    Contributor

    /lgtm

    pelefant pelefant commented on Dec 02, 2026 08:38 UTC
    Author

    /test pull-containerized-data-importer-fossa

    kubevirt-prow[bot] kubevirt-prow[bot] commented on Dec 02, 2026 08:39 UTC
    Bot

    @pelefant: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

    <details>

    In response to this:

    >/test pull-containerized-data-importer-fossa

    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.
    </details>

    pelefant pelefant commented on Dec 02, 2026 10:37 UTC
    Author

    /test pull-containerized-data-importer-fossa

    awels awels approved these changes on Dec 02, 2026 19:36 UTC
    Approved Reviewer

    /approve

    kubevirt-prow[bot] kubevirt-prow[bot] commented on Dec 02, 2026 19:37 UTC
    Bot

    [APPROVALNOTIFIER] This PR is APPROVED

    This pull-request has been approved by: <a href="https://github.com/kubevirt/containerized-data-importer/pull/4348#pullrequestreview-6157584382" title="Approved">awels</a>

    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:

  • ~~OWNERS~~ [awels]
  • Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment
    </details>
    <!-- META={"approvers":[]} -->

    kubevirt-prow[bot] kubevirt-prow[bot] commented on Dec 02, 2026 20:14 UTC
    Bot

    @pelefant: 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
    --- | --- | --- | --- | ---
    pull-containerized-data-importer-fossa | 4b1cb7f1f2f2a5ea32cc0830c3bb59037a5036bc | link | false | /test pull-containerized-data-importer-fossa
    pull-containerized-data-importer-e2e-istio | 4b1cb7f1f2f2a5ea32cc0830c3bb59037a5036bc | link | unknown | /test pull-containerized-data-importer-e2e-istio
    pull-containerized-data-importer-non-csi-hpp | 4b1cb7f1f2f2a5ea32cc0830c3bb59037a5036bc | link | unknown | /test pull-containerized-data-importer-non-csi-hpp
    pull-containerized-data-importer-e2e-hpp-latest | 4b1cb7f1f2f2a5ea32cc0830c3bb59037a5036bc | link | unknown | /test pull-containerized-data-importer-e2e-hpp-latest
    pull-containerized-data-importer-e2e-destructive | 4b1cb7f1f2f2a5ea32cc0830c3bb59037a5036bc | link | unknown | /test pull-containerized-data-importer-e2e-destructive
    pull-containerized-data-importer-e2e-hpp-previous | 4b1cb7f1f2f2a5ea32cc0830c3bb59037a5036bc | link | unknown | /test pull-containerized-data-importer-e2e-hpp-previous
    pull-containerized-data-importer-e2e-upg | 4b1cb7f1f2f2a5ea32cc0830c3bb59037a5036bc | link | unknown | /test pull-containerized-data-importer-e2e-upg

    <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.
    </details>
    <!-- test report -->

    Reviewers
    Assignees
    pelefant pelefant
    Labels
    risk: low confidence: 87.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 71.5% (HIGH) · Higher = larger blast radius
    71.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 87.8% · Lower = rushed or shallow review
    87.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 8.8% · Safe to merge
    8.8%