Skip to content

Commit

Permalink
Fix VM snapshot size during storage capacity check (apache#8101)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0183e25)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
  • Loading branch information
harikrishna-patnala authored and rohityadavcloud committed Oct 25, 2023
1 parent 0bf2711 commit 7ffdb9f
Showing 1 changed file with 0 additions and 2 deletions.
Expand Up @@ -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();

Expand Down Expand Up @@ -661,7 +660,6 @@ public long getVMSnapshotSizeByPool(long poolId) {
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;
Expand Down

0 comments on commit 7ffdb9f

Please sign in to comment.