fix(Cubelet): use correct Cloud Hypervisor disk API endpoint#337
Conversation
Signed-off-by: luzhixing12345 <luzhixing12345@163.com>
|
/cubebot review |
|
Claude finished @kinwin-ustc's task in 52s —— View job Code Review Checklist
Review FeedbackThis is a focused, well-scoped bug fix with 3 interconnected changes in 1. Actually using the The core fix. Previously url := chAPIPrefix + "add-disk" // always vm.add-diskNow correctly: url := chAPIPrefix + path2. Passing correct endpoint from Changed from 3. Context propagation via Good defensive change. Callers that pass a cancel/timeout context will now have it propagate to the HTTP request lifecycle, preventing hung requests. Without this, a cancelled caller context would leave the HTTP request running until completion or transport timeout. 4. Dynamic log field (line 107) The No issues found. The changes are correct, minimal, and the diff is easy to verify. The only observation worth noting:
|
|
Hi, may I ask when this PR might be merged? |
Fix Cubelet disk hotplug requests to use the requested Cloud Hypervisor endpoint instead of always calling
vm.add-disk. This makesDelDiskcorrectly callvm.remove-device.Also switch to
http.NewRequestWithContextso caller timeout/cancellation propagates to the HTTP request.