From 050ca002a4a4063fce99646702176e4b8267434d Mon Sep 17 00:00:00 2001 From: Harikrishna Patnala Date: Mon, 16 Oct 2023 12:05:19 +0530 Subject: [PATCH] Fix VM snapshot size during storage capacity check --- .../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;