VM Snapshot stuck at Expunging with KvmFileBasedStorageVmSnapshotStrategy
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 1.4k
- Avg merge
- 6d 19h
- Merged PRs (30d)
- 32
Description
### problem
`KvmFileBasedStorageVmSnapshotStrategy.deleteVMSnapshot` transitions the VM snapshot to `Expunging` during delete but doesn't transition it to `Error` state in case of exception or timeout
`VMSnapshotManagerImpl.hasActiveVMSnapshotTasks` counts `Expunging` as work in
progress, so operations like reboot and snapshot operations are blocked.
### versions
4.22
### The steps to reproduce the bug
1. Take a disk-only VM snapshot.
2. Write lots of data to the VM
3. set commands.timeout=MergeDiskOnlyVmSnapshotCommand=20
4. Delete the snapshot.
...
### What to do about it?
Snapshot state should transition to Error in case of timeout
Contributor guide
Research direction
Start with KvmFileBasedStorageVmSnapshotStrategy.deleteVMSnapshot and VMSnapshotManagerImpl.hasActiveVMSnapshotTasks, then reproduce the disk-only snapshot deletion with commands.timeout=MergeDiskOnlyVmSnapshotCommand=20. Trace the timeout or exception path and verify that the snapshot reaches Error rather than remaining Expunging, so reboot and later snapshot operations are no longer blocked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100