Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage capacity check does not consider the VM snapshot of DATADISK #8054

Closed
weizhouapache opened this issue Oct 9, 2023 · 1 comment
Closed
Milestone

Comments

@weizhouapache
Copy link
Member

as title

steps to reproduce the issue

  1. create vm with root and data disk
  2. check storage pool usage
  3. create vm snapshot
  4. 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
  • Bug Report
COMPONENT NAME

CLOUDSTACK VERSION

CONFIGURATION
OS / ENVIRONMENT
SUMMARY
STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

@DaanHoogland
Copy link
Contributor

fixed in 8101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants