Skip to content

Instantly share code, notes, and snippets.

@hemna

hemna/api.diff

Created Jul 15, 2020
Embed
What would you like to do?
diff --git a/cinder/volume/api.py b/cinder/volume/api.py
index 496424dde..d2a065be3 100644
--- a/cinder/volume/api.py
+++ b/cinder/volume/api.py
@@ -1741,14 +1741,14 @@ class API(base.Base):
'migration_policy': migration_policy,
'quota_reservations': reservations,
'old_reservations': old_reservations,
- 'resource_properties': {
- 'availability_zone': volume.availability_zone
- }}
+ }
type_azs = volume_utils.extract_availability_zones_from_volume_type(
new_type)
if type_azs is not None:
request_spec['availability_zones'] = type_azs
+ else:
+ request_spec['availability_zones'] = [volume.availability_zone]
self.scheduler_rpcapi.retype(context, volume,
request_spec=request_spec,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment