Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Multi-disk VM snapshot delete leaves DB inconsistent when one disk's merge times out after another disk's merge already succeeded

未关闭
#14,218 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
java

调研方向

Begin with the reproduction on KVM using SharedMountPoint, Filesystem, or NetworkFilesystem primary storage and a multi-disk VM, focusing on the snapshot deletion path and qcow2.delta.merge.timeout behavior. Done means a timed-out disk cannot leave another successfully merged disk pointing to a deleted file, with the operation either remaining atomic or persisting per-disk completion consistently.

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

描述

bug
problem

Deleting a disk-only VM snapshot on a multi-disk VM can leave CloudStack's database permanently inconsistent with the actual state of primary storage if one disk's merge completes successfully while another disk's merge in the same operation times out. The disk that succeeded has its underlying file correctly committed and removed on the hypervisor, but the corresponding database update is never applied - because the whole operation is treated as a single all-or-nothing unit. The affected volume is left pointing at a file that no longer exists, and the VM cannot subsequently be started.

versions

4.21.0.0+
KVM hypervisor, primary storage of type Filesystem / NetworkFilesystem / SharedMountPoint, VM with 2+ disks, disk-only VM snapshot (no memory).

The steps to reproduce the bug
  1. Create a VM with at least two disks on KVM/SharedMountPoint (or Filesystem/NetworkFilesystem) primary storage - one small disk, one large disk with enough real delta data that a commit takes noticeably longer than qcow2.delta.merge.timeout (or 1 hour, if using the running-VM/non-events path).
  2. Take a disk-only VM snapshot.
  3. Write enough data to the large disk that its subsequent commit will exceed the timeout.
  4. Delete the VM snapshot.
  5. Observe the small disk's merge completes and its delta file is deleted, while the large disk's commit is killed by the timeout.
What to do about it?
  • The operation is fully atomic: no disk's file is deleted/merged unless all disks in the snapshot are confirmed to have completed successfully, and the operation cleanly fails/rolls back to a well-defined error state if any disk times out; or
  • Per-disk completion is persisted incrementally as each disk finishes, so a disk that successfully merged is never left with a database record pointing at a deleted file, regardless of what happens to other disks in the same VM snapshot.
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 20 小时
30 天内合并 PR
27

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/cloudstack 的其他 Issue

查看 apache/cloudstack 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

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