fix(cloud-hypervisor): pass block devices in a single --disk flag - #990
fix(cloud-hypervisor): pass block devices in a single --disk flag#990CapThunder19 wants to merge 1 commit into
Conversation
✅ Deploy Preview for urunc canceled.
|
|
pls review it and tell me if any change needed |
|
I was going through this PR and the change looks correct to me. On main the block loop adds a --disk for every device, so once there's more than one disk you get multiple --disk flags and cloud-hypervisor just refuses to start. Collecting them under a single --disk is the right fix. |
|
@cmainas why invalid, what changes need to make? |
|
Hello @CapThunder19 , please read the contribution guide. Specifically:
|
|
@cmainas i have updated the pr description pls check |
Description
CloudHypervisor.BuildExecCmdappended a separate--diskflag per blockdevice. Cloud Hypervisor only accepts one
--diskflag with every disk as avalue after it and rejects a repeated flag:
So any container with more than one block device (e.g. block rootfs + a
block-backed volume) failed to start. A single disk worked, which is why the
existing e2e cases (all single-disk) missed it.
Fix: collect the disk specs and emit them behind one
--disk.ExactArgsand the no-block-device case are unaffected.Related issues
How was this tested?
Reproduced end-to-end with urunc + cloud-hypervisor v50.0.0
using a hand-built OCI bundle with a block rootfs and one
loop-backed volume no containerd/devmapper needed. Before the fix,
cloud-hypervisor rejects the args; after, it proceeds to kernel loading.
Also ran
go build ./...,go vet,gofmt, and the existing./pkg/unikontainers/...unit tests all passLLM usage
Claude sonnet investigating the bug and fixes
Checklist
make lint) no new issues from this change.make test_ctr,make test_nerdctl,make test_docker,make test_crictl).