fix(core): restore live-migration throughput via CAP_IPC_LOCK in rootless virt-launcher#2537
Closed
fl64 wants to merge 3 commits into
Closed
fix(core): restore live-migration throughput via CAP_IPC_LOCK in rootless virt-launcher#2537fl64 wants to merge 3 commits into
fl64 wants to merge 3 commits into
Conversation
Point versions.yml at the fix/virt-launcher-multifd-zerocopy-ipc-lock branch and add installCacheVersion to force a virt-artifact rebuild, so the CAP_IPC_LOCK rootless-patch can be validated in the cluster. Test-only change; will be replaced by a proper v1.6.2-v12n.N tag once the patch merges into v1.6.2-virtualization. Signed-off-by: Pavel Tishkov <pavel.tishkov@flant.com>
284c1cf to
55aa486
Compare
Rebuild virt-artifact against the updated 3p-kubevirt branch that also adds CAP_IPC_LOCK to the d8v-compute container securityContext (required so the ambient cap actually reaches QEMU). Signed-off-by: Pavel Tishkov <pavel.tishkov@flant.com>
…d exec) The libvirt_helper.go AmbientCaps change caused virt-launcher to fail starting virtqemud with EPERM (ambient caps need inheritable set, which is empty for non-root). Reverted; keeping only the container securityContext bounding-set change, which QEMU inherits anyway. Signed-off-by: Pavel Tishkov <pavel.tishkov@flant.com>
Member
Author
|
Closing: root cause of the live-migration throughput regression is the Go toolchain change (greenteagc / go1.25.11 from the ALT 20260119 CVE-mitigation toolchain), not the virt-launcher capabilities. The CAP_IPC_LOCK hypothesis was disproven (measured MemoryBps unchanged, ~140 Mbps). Investigation moved to PR #2539 (greenteagc A/B). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Point the build at a
3p-kubevirtfeature branch carrying a one-line patch:rootless
virt-launchernow grantsvirtqemud/QEMUCAP_IPC_LOCKin additionto
CAP_NET_BIND_SERVICE(pkg/virt-launcher/virtwrap/util/libvirt_helper.go).installCacheVersionis added toimages/virt-artifact/werf.inc.yamlto forcea virt-artifact rebuild so the patch actually lands in the image.
Why do we need it, and what problem does it solve?
After the rootless virt-launcher switch (qemu
uid 107->uid 64535), livemigration throughput collapsed from ~10-12 Gbps to ~200-300 Mbps, regardless of
link speed (reproduced on both 1 Gbps and 20 Gbps networks).
Root cause: the rootless QEMU ends up with
CapEff = 0x400(
cap_net_bind_serviceonly). Multifd zero-copy migration send (MSG_ZEROCOPY,which needs page pinning) is therefore unavailable, and QEMU silently falls back
to copy-send, throttling the migration channel. Measured on an idle VM at
DirtyRate=0:MemoryBpsstays ~300 Mbps, i.e. the channel — not dirty rate,not the network, not the disks — is the bottleneck. Code of the migration data
path (
migration-source.go,live-migration-source.go,migration-proxy.go)is byte-for-byte identical between
v12n.25.3andv12n.43.2; the onlyruntime change is the capability drop.
This PR is cluster-test scaffolding for the patch. If the measured peak
MemoryBpsreturns to multi-gigabit on the patched image, the assumption isconfirmed and the patch will be merged into
3p-kubevirtas a properv1.6.2-v12n.Ntag (this PR will then be re-pointed at the tag and theinstallCacheVersionline removed).What is the expected result?
with the new virt-launcher.
CapEffof the QEMU process becomescap_net_bind_service + cap_ipc_lock.MemoryBpsviavlctl domain stats -o json(MigrateDomainJobInfo.MemoryBps), andquery-migrate-parametersshows zero-copy send enabled.Checklist
Changelog entries