slavkap commented on a change in pull request #6057:
URL: https://github.com/apache/cloudstack/pull/6057#discussion_r821571617
##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -1583,12 +1583,27 @@ public Volume destroyVolume(long volumeId, Account
caller, boolean expunge, bool
s_logger.warn("Failed to expunge volume: " + volumeId);
return null;
}
+ markVolumeSnapshotsAsDestroyed(volume);
removeVolume(volume.getId());
}
return volume;
}
+ private void markVolumeSnapshotsAsDestroyed(VolumeVO volume) {
+ if (!Storage.ImageFormat.QCOW2.equals(volume.getFormat())) {
Review comment:
Yes, it's better to remove this check because if we don't have snapshots
on primary and secondary storage, the snapshot has to be marked as destroyed. I
will test it
--
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]