adaptive: honor user-provided capacityBytes when provider stats are unavailable#13059
adaptive: honor user-provided capacityBytes when provider stats are unavailable#13059genegr wants to merge 1 commit intoapache:4.20from
Conversation
|
@genegr as this is a simple bug fix, could you rebase over branch |
…navailable AdaptiveDataStoreLifeCycleImpl.initialize() guarded the user-provided capacityBytes behind stats != null when computing the pool capacity to persist. As a consequence, any adaptive provider that could not report capacity yet (for example a FlashArray pod that has not been given a quota and has no footprint yet, or a transient probe failure) caused the whole pool registration to fail with "Capacity bytes not available from the storage provider, user provided capacity bytes must be specified" even when the operator had passed capacityBytes= on createStoragePool. Accept the user-supplied value unconditionally and use the provider stats only as an upper-bound sanity check when they are actually available. The "no user-provided capacity, no provider capacity" branch is preserved and still raises the same InvalidParameterValueException. Signed-off-by: Eugenio Grosso <eugenio.grosso@gmail.com>
e7d2553 to
25641c3
Compare
|
|
||
| if (CollectionUtils.isNotEmpty(quarantinedAddressesIDs)) { | ||
| sc.setParameters("id", quarantinedAddressesIDs.toArray()); | ||
| } |
There was a problem hiding this comment.
@genegr IP related changes are not relevant to the PR description.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #13059 +/- ##
============================================
+ Coverage 16.27% 18.01% +1.74%
- Complexity 13438 16605 +3167
============================================
Files 5665 6029 +364
Lines 500534 542181 +41647
Branches 60789 66451 +5662
============================================
+ Hits 81437 97663 +16226
- Misses 409992 433501 +23509
- Partials 9105 11017 +1912
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:
|
|
Rebased onto No content changes; only the base. |
Description
Registering an adaptive-plugin-backed managed primary pool currently fails with
Capacity bytes not available from the storage provider, user provided capacity bytes must be specifiedeven whencapacityBytes=is actually passed tocreateStoragePool, whenever the provider cannot report capacity at that moment (for example a FlashArray pod with no quota and no footprint yet, or a transient probe failure).Root cause lives in
AdaptiveDataStoreLifeCycleImpl.initialize(): the user-supplied capacity was guarded behindstats != null, so any null stats caused a fall-through to the "no user capacity either" error branch even when the user did provide one.This change accepts the user-supplied value unconditionally and uses the provider stats only as an upper-bound sanity check when they are actually available. The "no user-provided capacity, no provider capacity" branch is preserved and still raises the same
InvalidParameterValueException.Types of changes
Feature/Enhancement Scale or Bug Severity
Major for any deployment that uses the adaptive storage framework against a provider which cannot report capacity synchronously at pool-register time — registration will always fail regardless of what
capacityBytesis passed.How Has This Been Tested?
Validated end-to-end on a 4.23-SNAPSHOT lab:
provider="Flash Array",transport=nvme-tcp) against an empty Purity pod withcapacitybytes=1099511627776andcapacityiops=100000. Before this change, the registration failed with the error above; after this change, the pool enters theUpstate using the user-provided capacity.capacityBytesthat exceeds the provider's capacity.mkfs.ext4+ SHA-256 write/verify, live-migrate between two KVM hosts with the data disk attached — no I/O gap across the migrate).