diff --git a/cinder/scheduler/filter_scheduler.py b/cinder/scheduler/filter_scheduler.py index d4969a4f772..b67e0595584 100644 --- a/cinder/scheduler/filter_scheduler.py +++ b/cinder/scheduler/filter_scheduler.py @@ -287,7 +287,12 @@ class FilterScheduler(driver.Scheduler): # takes 'resource_XX' and 'volume_XX' as input respectively, copying # 'volume_XX' to 'resource_XX' will make both filters happy. 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()