weizhouapache commented on code in PR #6868:
URL: https://github.com/apache/cloudstack/pull/6868#discussion_r1030736104
##########
server/src/main/java/com/cloud/storage/StorageManagerImpl.java:
##########
@@ -1325,6 +1328,12 @@ public void cleanupStorage(boolean recurring) {
List<VolumeVO> vols =
_volsDao.listVolumesToBeDestroyed(new Date(System.currentTimeMillis() -
((long)StorageCleanupDelay.value() << 10)));
for (VolumeVO vol : vols) {
+ if (Type.ROOT.equals(vol.getVolumeType()) &&
userVmManager.getDestroyRootVolumeOnVmDestruction(vol.getDomainId())) {
Review Comment:
@JoaoJandre
the vm state should be checked instead of the global/domain setting, because
the setting can be changed.
if vm state is in Destroyed state, skip it and continue
--
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]