sureshanaparti commented on a change in pull request #2090: CLOUDSTACK-8415
[VMware] SSVM shutdown during snapshot operation results in disks to be left
behind
URL: https://github.com/apache/cloudstack/pull/2090#discussion_r116937591
##########
File path: server/src/com/cloud/storage/StorageManagerImpl.java
##########
@@ -1104,14 +1107,61 @@ public void cleanupStorage(boolean recurring) {
}
// remove snapshots in Error state
- List<SnapshotVO> snapshots =
_snapshotDao.listAllByStatus(Snapshot.State.Error);
+ List<SnapshotVO> snapshots =
_snapshotDao.listAllByStatusIncludingRemoved(Snapshot.State.Error);
for (SnapshotVO snapshotVO : snapshots) {
try {
List<SnapshotDataStoreVO> storeRefs =
_snapshotStoreDao.findBySnapshotId(snapshotVO.getId());
+ boolean isVMware =
snapshotVO.getHypervisorType().equals(HypervisorType.VMware);
Review comment:
@DaanHoogland @mike-tutkowski Partial disks are left behind in VMware env
when SSVM is shutdown/destroyed. So, `DeleteSnapshotsDirCommand` for Image
store and `DeleteVMSnapshotCommand` for Primary store (to remove worker VM
snapshot) has been triggered in VMware env here to cleanup the partial disks
created in secondary storage and VM snapshots in primary respectively. The
VMware storage manager would cleanup the worker VM snapshot from
`DeleteVMSnapshotCommand`. No VMware specific code here, except sending these
commands for cleanup.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services