From 7ffdb9fa1c4b910894ad01218f1338cfbfa4fbe0 Mon Sep 17 00:00:00 2001 From: Harikrishna Date: Wed, 18 Oct 2023 15:19:26 +0530 Subject: [PATCH] Fix VM snapshot size during storage capacity check (#8101) (cherry picked from commit 0183e2527948d853eec718b96ddcc61de1b9ad5c) Signed-off-by: Rohit Yadav --- .../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 eb3206fc42e2..2b5e34c6876c 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 VolumeDaoImpl() { 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 long getVMSnapshotSizeByPool(long poolId) { SearchCriteria sc = TotalVMSnapshotSizeByPoolSearch.create(); sc.setParameters("poolId", poolId); sc.setParameters("state", State.Destroy); - sc.setParameters("vType", Volume.Type.ROOT.toString()); List results = customSearch(sc, null); if (results != null) { return results.get(0).sum;