Skip to content

fix(kubernetes): move kubevirt-csi-driver base off quay.io/centos to almalinux - #3400

Merged
myasnikovdaniil merged 1 commit into
mainfrom
fix/csi-base-almalinux
Jul 21, 2026
Merged

myasnikovdaniil merged 1 commit into
mainfrom
fix/csi-base-almalinux

Conversation

@myasnikovdaniil

@myasnikovdaniil myasnikovdaniil commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

packages/apps/kubernetes/images/kubevirt-csi-driver/Dockerfile pinned its runtime stage to quay.io/centos/centos:stream9 by digest. Quay serves only currently-tagged manifests — when a rolling tag moves, the superseded digest immediately returns MANIFEST_UNKNOWN, with no grace period.

stream9 rolls roughly every six days, so the pin has already died twice:

Date Fix Digest pinned Status today
Jul 15 #3303 0c9db821… → a93e3316… 0c9db821 gone
Jul 21 #3386 a93e3316… → 3714c89f… a93e3316 gone

Each death broke make build on main and on every PR triggering a full rebuild. Because the root build target is serial, a failure in packages/apps/kubernetes (4th of 29) aborts the remaining packages and leaves the shared build cache unwritten.

Repinning cannot fix this: the freshly pinned digest is always the current live tag, so it is next in line to be retired. This is not specific to CentOS — the same probe against quay.io/fedora/fedora:latest and quay.io/centos/centos:stream10 found every historical digest unfetchable.

This PR keeps the digest pin and changes the source to a registry that provably retains superseded manifests, making the pin durable rather than decorative. Renovate policy is unchanged — pinDigests stays on, and almalinux:9 is an ordinary rolling tag on a retaining registry exactly like the golang, alpine and debian bases already in the grouped digest PR.

Verification

Both bases were run locally with the Dockerfile's exact install line (dnf install -y e2fsprogs xfsprogs nfs-utils):

Binary CentOS Stream 9 AlmaLinux 9
mkfs.ext4 /usr/sbin/mkfs.ext4 /usr/sbin/mkfs.ext4
mkfs.xfs /usr/sbin/mkfs.xfs /usr/sbin/mkfs.xfs
blkid /usr/sbin/blkid /usr/sbin/blkid
mount /usr/bin/mount /usr/bin/mount
umount /usr/bin/umount /usr/bin/umount
fsck.ext4 /usr/sbin/fsck.ext4 /usr/sbin/fsck.ext4
fsck.xfs /usr/sbin/fsck.xfs /usr/sbin/fsck.xfs
mount.nfs /usr/sbin/mount.nfs /usr/sbin/mount.nfs

Every path k8s.io/mount-utils shells out to is identical. Package versions:

Package CentOS Stream 9 AlmaLinux 9
e2fsprogs 1.46.5-8.el9 1.46.5-8.el9
xfsprogs 6.4.0-7.el9 6.4.0-7.el9
nfs-utils 2.5.4-44.el9 2.5.4-42.el9_8
util-linux 2.37.4-26.el9 2.37.4-25.el9
glibc 2.34-274.el9 2.34-270.el9_8

Same upstream versions throughout; the el9 release-number lag is expected since AlmaLinux is downstream of RHEL 9 while CentOS Stream 9 is upstream. e2fsprogs and xfsprogs — the two that govern mkfs/fsck behaviour — are identical NVRs. glibc is not linked at all: the driver is built CGO_ENABLED=0.

The pinned digest is the OCI image index covering amd64, arm64, ppc64le and s390x — the same architecture set as the previous base.

Retention was verified empirically rather than assumed: four superseded docker.io/library digests taken from this repo's own git history (golang:1.26, golang:1.26-alpine, alpine:3.24, alpine:3.22) all still resolve after their tags moved.

Scope

This addresses the immediate recurring breakage only. The broader concern in #3305 — that any retired digest blocks the entire platform build, with no advance warning and no fast path to repin — is not solved here and remains open.

Release note

fix(kubernetes): move the kubevirt-csi-driver runtime base from quay.io/centos/centos:stream9 to docker.io/library/almalinux:9. Quay retires superseded manifests as soon as a rolling tag moves, which broke builds twice in six days; AlmaLinux 9 provides an equivalent RHEL 9 userspace on a registry that retains them, so the digest pin remains valid over time. No functional change to the driver.

Summary by CodeRabbit

  • Chores
    • Updated the container runtime environment to use AlmaLinux 9 instead of CentOS Stream 9.
    • Kubernetes CSI driver behavior and startup configuration remain unchanged.

…almalinux

quay.io serves only currently-tagged manifests: when a rolling tag moves,
the superseded digest immediately returns MANIFEST_UNKNOWN. The pinned
`centos:stream9` digest has died twice in six days (#3303, #3386), each
time breaking `make build` on main and on every PR that triggers a full
rebuild.

Repinning is not a fix -- the newly pinned digest is always the live tag,
so it is next in line to be retired. Move the runtime stage to a registry
that provably retains superseded manifests instead, which makes the digest
pin durable rather than decorative. Pinning policy is unchanged.

Verified equivalent: after `dnf install -y e2fsprogs xfsprogs nfs-utils`,
both bases provide mkfs.ext4, mkfs.xfs, blkid, mount, umount, fsck.ext4,
fsck.xfs and mount.nfs at identical paths. e2fsprogs and xfsprogs are
identical NVRs. The driver is built CGO_ENABLED=0, so the base libc is not
linked. The pinned digest is the OCI index covering amd64, arm64, ppc64le
and s390x -- the same architecture set as the previous base.

Assisted-By: Claude <[email protected]>
Signed-off-by: Myasnikov Daniil <[email protected]>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves persistent build failures in the kubevirt-csi-driver by switching the base image to a registry that retains historical manifests. The previous dependency on Quay.io caused frequent build breaks due to the rapid rotation of rolling tags and the immediate removal of superseded digests. AlmaLinux 9 provides an equivalent RHEL 9-based environment while ensuring that pinned image digests remain valid over time.

Highlights

  • Base Image Migration: Migrated the kubevirt-csi-driver runtime base image from quay.io/centos/centos:stream9 to docker.io/library/almalinux:9 to ensure long-term stability of the pinned digest.
  • Build Reliability: Addressed recurring build failures caused by Quay.io's policy of removing superseded manifests, which frequently invalidated pinned digests.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment Gemini (@gemini-code-assist) Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8606d818-416c-4431-86ce-54e32b42e0f3

📥 Commits

Reviewing files that changed from the base of the PR and between 741a5ac and 14af872.

📒 Files selected for processing (1)
  • packages/apps/kubernetes/images/kubevirt-csi-driver/Dockerfile

📝 Walkthrough

Walkthrough

The kubevirt CSI driver Dockerfile now uses a pinned AlmaLinux 9 image for its final runtime stage. Package installation, binary copying, and the entrypoint remain unchanged.

Changes

Kubevirt CSI driver runtime

Layer / File(s) Summary
Replace runtime base image
packages/apps/kubernetes/images/kubevirt-csi-driver/Dockerfile
The final stage switches from the pinned CentOS Stream 9 image to the pinned AlmaLinux 9 image while retaining the existing runtime instructions.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: kvaps

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: switching the kubevirt-csi-driver base image from CentOS Stream to AlmaLinux.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/csi-base-almalinux

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.

🔧 Checkov (3.3.8)
packages/apps/kubernetes/images/kubevirt-csi-driver/Dockerfile

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@dosubot dosubot Bot added area/build Issues or PRs related to image build infrastructure, multi-arch support area/kubernetes Issues or PRs related to the tenant Kubernetes app kind/bug Categorizes issue or PR as related to a bug labels Jul 21, 2026

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the base image for the kubevirt-csi-driver Dockerfile, switching from CentOS Stream 9 to AlmaLinux 9. There are no review comments to assess, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@github-actions github-actions Bot added the size/XS This PR changes 0-9 lines, ignoring generated files label Jul 21, 2026

@androndo Andrey Kolkov (androndo) 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

This is a one-line runtime-base swap in packages/apps/kubernetes/images/kubevirt-csi-driver/Dockerfile, from quay.io/centos/centos:stream9@sha256:3714c89f… to docker.io/library/almalinux:9@sha256:d2515c76…. The PR is unusually well-argued, and I was able to independently confirm every load-bearing claim.

Verified against the live registry and repo:

  • Digest validity + architecture parity. The pinned digest d2515c76… resolves to an application/vnd.oci.image.index.v1+json index covering exactly linux/amd64, linux/arm64, linux/ppc64le, linux/s390x — the same architecture set as the CentOS base it replaces. Claim confirmed.
  • The pin is the current live tag. HEAD on docker.io/library/almalinux:9 returns docker-content-digest: sha256:d2515c76…, matching the pinned digest exactly. This is expected and correct: the whole premise is that Docker Hub retains superseded digests when the tag rolls, unlike Quay, so the pin stays fetchable after the tag moves.
  • Renovate policy genuinely unchanged. .github/renovate.json pins dockerfile bases via pinDigests: true with the human-readable tag kept in front of the digest (rule at lines 63–67), and batches digest refreshes into the weekly group (69–74). The new almalinux:9@sha256:… line matches that format precisely, so it will be tracked and refreshed exactly like the existing golang/alpine/debian bases. No policy change smuggled in.
  • Registry consistency. The builder stage in this same Dockerfile already pulls docker.io/library/golang, so moving the runtime stage to docker.io/library aligns it with existing practice rather than introducing a new registry dependency.
  • No documentation drift. The only centos/stream9 references anywhere in the tree outside this Dockerfile are in docs/changelogs/v1.3.0*.md, and those are about VM images (vm-default-images), entirely unrelated to the CSI driver base. Nothing stale to fix.

Functional equivalence rests on the PR's local verification tables (mkfs/fsck/mount/nfs binary paths and e2fsprogs/xfsprogs NVRs identical; driver built CGO_ENABLED=0 so the base libc is never linked). I could not re-run dnf install here, but the reasoning is sound: almalinux:9 is a full RHEL-9 userspace base (BaseOS+AppStream, dnf present), the install line and RUN/COPY/ENTRYPOINT are byte-for-byte unchanged, and the static-binary + shell-out-to-mount-utils design means only those tool paths matter.

On tests: the real contract here (the image builds and ships working mkfs/fsck/mount/mount.nfs) is exercised by make build and the kubernetes-app e2e path, not by any unit test — and this repo has no per-Dockerfile test to extend. A bespoke test asserting the base-image string would just grep the Dockerfile, which verifies nothing about the running driver. So I am not blocking on a missing test; the existing build/e2e flow is the correct guard.

One consideration, non-blocking: this shifts another base pull onto Docker Hub, which enforces anonymous pull rate limits that Quay did not. In practice this is not a new regression — CI already pulls golang/alpine/debian from docker.io/library, the digest is BuildKit-cached, and if anything Quay was the outlier. Worth being aware of only if CI later starts hitting Hub 429s across the board.

The PR's own "Scope" section is honest that this does not solve the broader #3305 problem (any retired digest still aborts the serial platform build with no warning); that is correctly left out of scope.

@myasnikovdaniil
myasnikovdaniil merged commit 3ad3c2e into main Jul 21, 2026
23 checks passed
@myasnikovdaniil
myasnikovdaniil deleted the fix/csi-base-almalinux branch July 21, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Issues or PRs related to image build infrastructure, multi-arch support area/kubernetes Issues or PRs related to the tenant Kubernetes app kind/bug Categorizes issue or PR as related to a bug size/XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants