You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2023/10/18 09:49:32 UTC
[cloudstack] branch 4.18 updated: Fix VM snapshot size during storage capacity check (#8101)
This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.18 by this push:
new 0183e252794 Fix VM snapshot size during storage capacity check (#8101)
0183e252794 is described below
commit 0183e2527948d853eec718b96ddcc61de1b9ad5c
Author: Harikrishna <ha...@gmail.com>
AuthorDate: Wed Oct 18 15:19:26 2023 +0530
Fix VM snapshot size during storage capacity check (#8101)
---
engine/schema/src/main/java/com/cloud/storage/dao/VolumeDaoImpl.java | 2 --
1 file changed, 2 deletions(-)
diff --git a/engine/schema/src/main/java/com/cloud/storage/dao/VolumeDaoImpl.java b/engine/schema/src/main/java/com/cloud/storage/dao/VolumeDaoImpl.java
index eb3206fc42e..2b5e34c6876 100644
--- a/engine/schema/src/main/java/com/cloud/storage/dao/VolumeDaoImpl.java
+++ b/engine/schema/src/main/java/com/cloud/storage/dao/VolumeDaoImpl.java
@@ -419,7 +419,6 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
TotalVMSnapshotSizeByPoolSearch.and("poolId", TotalVMSnapshotSizeByPoolSearch.entity().getPoolId(), Op.EQ);
TotalVMSnapshotSizeByPoolSearch.and("removed", TotalVMSnapshotSizeByPoolSearch.entity().getRemoved(), Op.NULL);
TotalVMSnapshotSizeByPoolSearch.and("state", TotalVMSnapshotSizeByPoolSearch.entity().getState(), Op.NEQ);
- TotalVMSnapshotSizeByPoolSearch.and("vType", TotalVMSnapshotSizeByPoolSearch.entity().getVolumeType(), Op.EQ);
TotalVMSnapshotSizeByPoolSearch.and("instanceId", TotalVMSnapshotSizeByPoolSearch.entity().getInstanceId(), Op.NNULL);
TotalVMSnapshotSizeByPoolSearch.done();
@@ -661,7 +660,6 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
SearchCriteria<SumCount> sc = TotalVMSnapshotSizeByPoolSearch.create();
sc.setParameters("poolId", poolId);
sc.setParameters("state", State.Destroy);
- sc.setParameters("vType", Volume.Type.ROOT.toString());
List<SumCount> results = customSearch(sc, null);
if (results != null) {
return results.get(0).sum;