Skip to content

Validate Storage Capacity Before Volume Create - #14314

Open
sp16743 wants to merge 1 commit into
apache:mainfrom
NetApp:validate-storage-capacity-before-volume-create
Open

sp16743 wants to merge 1 commit into
apache:mainfrom
NetApp:validate-storage-capacity-before-volume-create

Conversation

@sp16743

@sp16743 sp16743 commented Oct 5, 2026 •

Copy link
Copy Markdown

Description

This PR adds a storage-capacity check when creating a volume on an explicitly selected primary storage pool.

Previously, this path could attempt volume creation without validating the pool’s available over-provisioned capacity. The change rejects the request when the selected pool does not have enough space.

Fixes: #14313

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Before the fix:
Screenshot 2026-09-28 at 3 38 20 PM

Screenshot 2026-09-28 at 3 38 28 PM

After the fix:
Screenshot 2026-09-28 at 2 40 16 PM
Screenshot 2026-09-30 at 9 05 03 PM

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@boring-cyborg

boring-cyborg Bot commented Oct 5, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
Here are some useful points:

@weizhouapache

Copy link
Copy Markdown
Member

there is a similar PR #14071, I will close it, let's focus on this

@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.91%. Comparing base (1a48a87) to head (7b51040).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...n/java/com/cloud/storage/VolumeApiServiceImpl.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #14314   +/-   ##
=========================================
  Coverage     19.91%   19.91%           
- Complexity    20199    20200    +1     
=========================================
  Files          6373     6373           
  Lines        577230   577233    +3     
  Branches      70696    70697    +1     
=========================================
+ Hits         114950   114959    +9     
+ Misses       449713   449708    -5     
+ Partials      12567    12566    -1     
Flag Coverage Δ
uitests 3.71% <ø> (ø)
unittests 21.18% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Volume creation on an explicitly selected primary storage pool does not validate available capacity

2 participants