Skip to content

Commit 7ffdb9f

Browse files
Fix VM snapshot size during storage capacity check (apache#8101)
(cherry picked from commit 0183e25) Signed-off-by: Rohit Yadav <[email protected]>
1 parent 0bf2711 commit 7ffdb9f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

engine/schema/src/main/java/com/cloud/storage/dao/VolumeDaoImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,6 @@ public VolumeDaoImpl() {
419419
TotalVMSnapshotSizeByPoolSearch.and("poolId", TotalVMSnapshotSizeByPoolSearch.entity().getPoolId(), Op.EQ);
420420
TotalVMSnapshotSizeByPoolSearch.and("removed", TotalVMSnapshotSizeByPoolSearch.entity().getRemoved(), Op.NULL);
421421
TotalVMSnapshotSizeByPoolSearch.and("state", TotalVMSnapshotSizeByPoolSearch.entity().getState(), Op.NEQ);
422-
TotalVMSnapshotSizeByPoolSearch.and("vType", TotalVMSnapshotSizeByPoolSearch.entity().getVolumeType(), Op.EQ);
423422
TotalVMSnapshotSizeByPoolSearch.and("instanceId", TotalVMSnapshotSizeByPoolSearch.entity().getInstanceId(), Op.NNULL);
424423
TotalVMSnapshotSizeByPoolSearch.done();
425424

@@ -661,7 +660,6 @@ public long getVMSnapshotSizeByPool(long poolId) {
661660
SearchCriteria<SumCount> sc = TotalVMSnapshotSizeByPoolSearch.create();
662661
sc.setParameters("poolId", poolId);
663662
sc.setParameters("state", State.Destroy);
664-
sc.setParameters("vType", Volume.Type.ROOT.toString());
665663
List<SumCount> results = customSearch(sc, null);
666664
if (results != null) {
667665
return results.get(0).sum;

0 commit comments

Comments
 (0)