Merge "Fix: failed to create snapshot with DriverFilter"
This commit is contained in:
commit
314f3a4596
@ -287,7 +287,12 @@ class FilterScheduler(driver.Scheduler):
|
|||||||
# takes 'resource_XX' and 'volume_XX' as input respectively, copying
|
# takes 'resource_XX' and 'volume_XX' as input respectively, copying
|
||||||
# 'volume_XX' to 'resource_XX' will make both filters happy.
|
# 'volume_XX' to 'resource_XX' will make both filters happy.
|
||||||
volume_type = request_spec.get("volume_type")
|
volume_type = request_spec.get("volume_type")
|
||||||
resource_type = volume_type if volume_type is not None else {}
|
# When creating snapshots, the value of volume_type is None here
|
||||||
|
# which causes issues in filters (Eg: Bug #1856126).
|
||||||
|
# To prevent that, we set it as an empty dictionary here.
|
||||||
|
if volume_type is None:
|
||||||
|
volume_type = {}
|
||||||
|
resource_type = volume_type
|
||||||
|
|
||||||
config_options = self._get_configuration_options()
|
config_options = self._get_configuration_options()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user