Set up QEMU and limit GOMAXPROCS for emulated builder builds #4339
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 399 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.358
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4339"
general
weight: 0.35
pelefant
<!-- 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:
After the builder moved to CentOS Stream 10, publication repeatedly failed on s390x. The tracing added in #4336 showed that
uname -mworked, butdnf --versionexited with status 139 before package installation. A later run also stalled during Go tool installation on arm64 until the job timed out.This PR makes two changes:
GOMAXPROCS=3during Go tool installation on arm64 and s390x to mitigate hangs under QEMU, following the workaround in kubevirt/project-infra#4654. Add shell tracing andgo install -vto show progress.The QEMU setup uses the same image and registration command as KubeVirt's
hack/builder/build-centos-stream-10.sh:podman run --rm --privileged quay.io/linuxserver.io/qemu-static --reset -p yes
KubeVirt runs this command when its check for an enabled aarch64 handler fails. CDI runs it before every Buildah build that requires emulation, rather than relying on the handlers already registered in the CI environment.
The existing build and publication flow is unchanged. There is no probe or retry logic.
Which issue(s) this PR fixes:
Related to CNV-98989, #4333 and #4336.
Special notes for your reviewer:
The registration replaces all visible
qemu-*binfmt handlers, including arm64, and may affect other workloads sharing them.If registration fails, the script stops with its exit status. Printing the registered handlers is best effort and does not block the build.
The
GOMAXPROCSlimit applies only to the Go tool installation RUN step on arm64 and s390x, including native builds on those architectures. It is not stored as an ENV setting in the resulting image.The Docker build path, builder pin and runtime RPMs are unchanged.
Validation of the simplified QEMU setup included nine passing scenarios with stubbed commands on Fedora. One mount scenario was skipped because binfmt_misc was already mounted.
bash -nandgit diff --checkalso passed.Post-merge validation:
https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/logs/push-containerized-data-importer-builder/2120901674712174592
The publisher completed successfully in about 35 minutes:
dnf --version.GOMAXPROCS=3.Published builder:
quay.io/kubevirt/kubevirt-cdi-bazel-builder:2611121529-29097cbdfThe published OCI index was checked with skopeo and contains linux/amd64, linux/arm64 and linux/s390x.
This confirms that the updated setup works. It does not establish the root cause of the earlier failures: the successful run used a different node, and the job settings were also updated in kubevirt/project-infra#5625.
Release note:
``
release-note
``NONE