mirror of https://github.com/apache/cloudstack.git
Fix VM snapshot size during storage capacity check (#8101)
(cherry picked from commit 0183e25279)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
4c7a81bd82
commit
198e48c7c5
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue