adaptive: honor user-provided capacityBytes when provider stats are unavailable#13059
Open
genegr wants to merge 2 commits intoapache:mainfrom
Open
adaptive: honor user-provided capacityBytes when provider stats are unavailable#13059genegr wants to merge 2 commits intoapache:mainfrom
genegr wants to merge 2 commits intoapache:mainfrom
Conversation
Member
|
@genegr as this is a simple bug fix, could you rebase over branch |
3 tasks
…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()); | ||
| } |
Contributor
There was a problem hiding this comment.
@genegr IP related changes are not relevant to the PR description.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).