Skip to content

CSTACKEX-345: validate storage pool capacity for volume creation - #123

Open
sp16743 wants to merge 2 commits into
mainfrom
bugfix/CSTACKEX-345
Open

sp16743 wants to merge 2 commits into
mainfrom
bugfix/CSTACKEX-345

Conversation

@sp16743

@sp16743 sp16743 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR resolves two review comments on creating a volume directly on a storage pool.

createVolume() no longer wraps InvalidParameterValueException as Failed to create volume: …. After the existing cleanup, that exception is rethrown, so the API caller receives the original message

Upstream PR: apache#14314
Issue: apache#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):

How Has This Been Tested?

storagePoolHasEnoughSpace check:
Disable threshold 10%:
Screenshot 2026-10-14 at 4 16 49 PM
Screenshot 2026-10-14 at 4 15 48 PM
Screenshot 2026-10-14 at 4 16 02 PM

Overprovisioning factor 2:
Screenshot 2026-10-14 at 4 19 35 PM
Screenshot 2026-10-14 at 4 19 05 PM
Screenshot 2026-10-14 at 4 18 17 PM

Rethrow InvalidParameterValueException:
Screenshot 2026-10-14 at 12 03 44 PM
Screenshot 2026-10-14 at 12 12 50 PM
Screenshot 2026-10-14 at 12 23 15 PM

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.84%
Branch coverage 19.00%

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

@github-actions

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.85%
Branch coverage 19.01%

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

created = false;
VolumeInfo vol = volFactory.getVolume(volumeId);
vol.stateTransit(Volume.Event.DestroyRequested);
if (e instanceof InvalidParameterValueException) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Any reason for handling this separately?

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.

2 participants