X Tutup
Skip to content

Fix error message while creating local storage pool#12767

Open
vishesh92 wants to merge 2 commits intoapache:4.20from
shapeblue:fix-local-storage-error
Open

Fix error message while creating local storage pool#12767
vishesh92 wants to merge 2 commits intoapache:4.20from
shapeblue:fix-local-storage-error

Conversation

@vishesh92
Copy link
Member

Description

This PR fixes #12094

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?

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

@vishesh92
Copy link
Member Author

@blueorangutan package

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 4.15%. Comparing base (56dc119) to head (e9872b1).

❗ There is a different number of reports uploaded between BASE (56dc119) and HEAD (e9872b1). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (56dc119) HEAD (e9872b1)
unittests 1 0
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     
Flag Coverage Δ
uitests 4.15% <ø> (ø)
unittests ?

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

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@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.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 17045

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@vishesh92 vishesh92 force-pushed the fix-local-storage-error branch from b385569 to e9872b1 Compare March 10, 2026 08:00
@apache apache deleted a comment from blueorangutan Mar 10, 2026
@vishesh92
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@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.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17063

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.

5 participants

X Tutup