Commit 25641c3
adaptive: honor user-provided capacityBytes when provider stats are unavailable
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>1 parent 9f96c9d commit 25641c3
1 file changed
Lines changed: 7 additions & 6 deletions
File tree
- plugins/storage/volume/adaptive/src/main/java/org/apache/cloudstack/storage/datastore/lifecycle
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
221 | 224 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| |||
0 commit comments