weizhouapache commented on PR #14456:
URL: https://github.com/apache/cloudstack/pull/14456#issuecomment-6315995964
Manual test of this change on KVM with Ceph RBD primary storage (4.23.0
build with this commit, deployed on both management servers):
**Setup**
- `kvm.vmstoragesnapshot.enabled=true`
- Debian 12 VM on a KVM host, root volume on an RBD pool, no connected QEMU
guest agent (the cloud image has none by default)
**Steps and results**
1. Create a quiesced disk-only Instance Snapshot (`createVMSnapshot` with
`quiescevm=true`). It fails as in #13972:
`Could not freeze Instance. Failed to frozen VM - i-2-1070-VM due to
Guest agent is not responding: QEMU guest agent is not connected`
The snapshot is left in `Error` state (type `Disk`), no disk snapshot was
taken.
2. Stop the VM.
3. `deleteVMSnapshot` on the failed snapshot: `success: true`. The VM has no
snapshots left, and there is no `Domain not found` error.
4. Destroy and expunge the VM: succeeds, the VM is gone.
**Unit tests**
- `VMSnapshotStrategyKVMTest`: 7 tests pass (the 5 existing ones plus 2 for
`canHandle()`):
- an `Error` snapshot with no `STORAGE_SNAPSHOT` details is handled by
`StorageVMSnapshotStrategy` (returns `HYPERVISOR`);
- a `Ready` snapshot with no details is still `CANT_HANDLE` (existing
behaviour kept).
**Not tested**
- I did not run the same steps on a build without this change, so I have not
seen the original `Domain not found` failure in this environment. The reasoning
is from the code: `canHandle()` returned `CANT_HANDLE` for such a snapshot, so
the delete went to `DefaultVMSnapshotStrategy`, which needs a libvirt domain.
- Other storage types, and a failure after some disk snapshots were already
taken (this case was already handled, because the details exist).
- The 4.22 branch itself (the unit tests ran on a 4.23.0 base).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]