apache / apache/cloudstack

VM snapshot merge on KVM can leave volume.path in DB pointing to a file that no longer exists (multi-disk VMs)

未关闭
#14,030 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
component:kvm type:bug
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 19 小时
30 天内合并 PR
32

描述

Summary:
When deleting a VM snapshot on KVM for a VM with more than one disk, each disk's data gets folded back into its real file one at a time, but CloudStack only gets a single "succeeded or failed" answer for the whole set. If an earlier disk's fold finishes for real but a later disk's then fails or times out, the whole thing is reported as failed, so CloudStack never updates its record for the disk that actually finished. Its database is left pointing to a file that no longer exists, with nothing to catch or fix this later. The VM then fails to start with "Can't find volume:", and the only current fix is to manually correct the database to match the real file.

Steps to reproduce:
1. Create a VM with two or more disks on KVM.
2. Take a VM snapshot, then delete it while the VM has enough disk activity that the merge takes a while (or induce a timeout/communication failure partway through the multi-disk merge).
3. If one disk's merge completes on the host before another disk's merge fails/times out, the completed disk's volumes.path is left stale.
4. Attempt to start the VM. It fails looking for the old file.

Environment where this was observed: KVM, disk-only VM snapshots, VM with 2 disks (ROOT + DATA), primary storage on NFS.

贡献指南

打开贡献指南

调研方向

首先跟踪 KVM 在多磁盘合并中的快照删除路径,以及其聚合结果如何更新卷路径;该 issue 未提供文件名或测试名称。复现一次部分合并失败,然后验证已完成的磁盘仍保留有效的数据库路径,并且 VM 无需手动修复数据库即可启动。

由索引模型根据 Issue 内容生成。

评估

领域
cloud, infrastructure
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。