as title
steps to reproduce the issue
- create vm with root and data disk
- check storage pool usage
- create vm snapshot
- check storage pool usage again
expected: both root and data disk size are considered
actual: only root disk size is considered
it seems to be caused by the line sc.setParameters("vType", Volume.Type.ROOT.toString()); in code
@Override
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;
} else {
return 0;
}
}
|
sc.setParameters("vType", Volume.Type.ROOT.toString()); |
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
as title
steps to reproduce the issue
expected: both root and data disk size are considered
actual: only root disk size is considered
it seems to be caused by the line
sc.setParameters("vType", Volume.Type.ROOT.toString());in codecloudstack/engine/schema/src/main/java/com/cloud/storage/dao/VolumeDaoImpl.java
Line 664 in e333f27
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS