a77f78c060
Previously, while creating snapshots, the code didn't pass through
scheduler therefore available capacity for backend wasn't checked.
This was supported by [1] which passed a RequestSpec object to
scheduler with snapshot and volume properties (the same RequestSpec
object is used for volumes).
But when the scheduler tries to get volume_type from RequestSpec obj,
unfortunately, it has a property named 'volume_type' but is None for
snapshots which breaks the scheduler when getting extra_specs from
the volume type (as the default value {} would've been set if the
property didn't exist).
Similar issue occurred when we supported untyped volumes and was
fixed by [2] and [3].
This patch sets the volume_type to an empty dict when it is found
None (which is the case while creating snapshots).
[1] https://review.opendev.org/#/c/509011/
[2] https://review.opendev.org/#/c/457431/
[3] https://review.opendev.org/#/c/471672/
Change-Id: I89a8cc42ca8984ee837a2b88f60ad126783282b9
Closes-Bug: #1856126
(cherry picked from commit
|
||
---|---|---|
.. | ||
evaluator | ||
filters | ||
flows | ||
weights | ||
__init__.py | ||
base_filter.py | ||
base_handler.py | ||
base_weight.py | ||
driver.py | ||
filter_scheduler.py | ||
host_manager.py | ||
manager.py | ||
rpcapi.py | ||
scheduler_options.py |