Skip to content

CSTACKEX-325: Validate storage capacity before creating volume - #111

Merged
sp16743 merged 1 commit into
mainfrom
bugfix/CSTACKEX-325
Oct 1, 2026
Merged

sp16743 merged 1 commit into
mainfrom
bugfix/CSTACKEX-325

Conversation

@sp16743

@sp16743 sp16743 commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR...
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.

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?

@github-actions

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.74%
Branch coverage 18.87%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

@piyush5netapp piyush5netapp left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find @sp16743 .

Comment thread server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
@sp16743
sp16743 merged commit 02837ff into main Oct 1, 2026
12 checks passed
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

Successfully merging this pull request may close these issues.

4 participants