Fix error message while creating local storage pool#12767
Fix error message while creating local storage pool#12767vishesh92 wants to merge 2 commits intoapache:4.20from
Conversation
|
@blueorangutan package |
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #12094, where attempting to create a local storage pool via the API results in an unhelpful NPE (DataStore.getId() because "store" is null) when local storage is not enabled for the zone. The fix adds an early validation check in createPool() to throw a meaningful InvalidParameterValueException before reaching the code that would return null and cause the NPE.
Changes:
- Added a validation check in
StorageManagerImpl.createPool()to verify that local storage is enabled for the zone before attempting to create a local (file-scheme) storage pool, providing a user-friendly error message instead of a cryptic NPE.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12767 +/- ##
=============================================
- Coverage 16.25% 4.15% -12.11%
=============================================
Files 5662 404 -5258
Lines 500167 32966 -467201
Branches 60740 5893 -54847
=============================================
- Hits 81318 1370 -79948
+ Misses 409763 31420 -378343
+ Partials 9086 176 -8910
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 17045 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b385569 to
e9872b1
Compare
|
@blueorangutan package |
|
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17063 |
Description
This PR fixes #12094
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?