Fix NoneType has no attribute get
If volume_type is None and then create volumes with allow-multiattach, Cinder-schduler will raise error: AttributeError: 'NoneType' object has no attribute 'get' Change-Id: Ied42d13b642617dd239ea92c019354b90657821a Closes-bug: #1683431
This commit is contained in:
parent
b441c6d151
commit
a58f66e180
@ -277,7 +277,8 @@ class FilterScheduler(driver.Scheduler):
|
|||||||
# Since Cinder is using mixed filters from Oslo and it's own, which
|
# Since Cinder is using mixed filters from Oslo and it's own, which
|
||||||
# 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 = resource_type = request_spec.get("volume_type")
|
volume_type = request_spec.get("volume_type")
|
||||||
|
resource_type = request_spec.get("volume_type", {})
|
||||||
|
|
||||||
config_options = self._get_configuration_options()
|
config_options = self._get_configuration_options()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user