Multi-disk VM snapshot delete leaves DB inconsistent when one disk's merge times out after another disk's merge already succeeded
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- java
- Ambito
- databases, infrastructure
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Create a VM with at least two disks on KVM/
SharedMountPoint(orFilesystem/NetworkFilesystem) primary storage - one small disk, one large disk with enough real delta data that a commit takes noticeably longer thanqcow2.delta.merge.timeout(or 1 hour, if using the running-VM/non-events path). - Take a disk-only VM snapshot.
- Write enough data to the large disk that its subsequent commit will exceed the timeout.
- Delete the VM snapshot.
- 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.
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 1.4k
- Merge medio
- 6g 20h
- PR unite (30g)
- 27
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/cloudstack
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
apache/cloudstack#14222 ·
-
create-kubernetes-binaries-iso.sh builds the ISO without setting a volume ID on EL8 based os's Apertabug component:kubernetes
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
apache/cloudstack#14180 ·
-
bug component:projects component:UI
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
apache/cloudstack#14070 · 5 commenti ·
-
component:backup
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/cloudstack#14013 ·
-
KVM agent fails to connect to Ceph RBD storage pool after upgrading Ceph client to Tentacle 20.2.4 Apertabug component:ceph
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/cloudstack#13989 · 3 commenti ·
Tutte le issue di apache/cloudstack
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
elastic/gradle-plugins#157 ·
-
enhancement Tools
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
apache/rocketmq-dashboard#5008 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
DETECT_PARAMETER_NAMES=false silently disables @ConstructorProperties-based Creator detection too Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
FasterXML/jackson-databind#6229 ·