Merge "Fix volume clone across cluster members"
This commit is contained in:
@@ -740,12 +740,19 @@ class CreateVolumeFromSpecTask(flow_utils.CinderTask):
|
|||||||
urls = list(set([direct_url]
|
urls = list(set([direct_url]
|
||||||
+ [loc.get('url') for loc in locations or []]))
|
+ [loc.get('url') for loc in locations or []]))
|
||||||
image_volume_ids = self._extract_cinder_ids(urls)
|
image_volume_ids = self._extract_cinder_ids(urls)
|
||||||
|
|
||||||
|
filters = {'id': image_volume_ids}
|
||||||
|
if volume.cluster_name:
|
||||||
|
filters['cluster_name'] = volume.cluster_name
|
||||||
|
else:
|
||||||
|
filters['host'] = volume.host
|
||||||
|
|
||||||
if self.driver.capabilities.get('clone_across_pools'):
|
if self.driver.capabilities.get('clone_across_pools'):
|
||||||
image_volumes = self.db.volume_get_all(
|
image_volumes = self.db.volume_get_all(
|
||||||
context, filters={'id': image_volume_ids})
|
context, filters=filters)
|
||||||
else:
|
else:
|
||||||
image_volumes = self.db.volume_get_all_by_host(
|
image_volumes = self.db.volume_get_all_by_host(
|
||||||
context, volume['host'], filters={'id': image_volume_ids})
|
context, volume['host'], filters=filters)
|
||||||
|
|
||||||
for image_volume in image_volumes:
|
for image_volume in image_volumes:
|
||||||
# For the case image volume is stored in the service tenant,
|
# For the case image volume is stored in the service tenant,
|
||||||
|
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
`Bug #1906286 <https://bugs.launchpad.net/cinder/+bug/1906286>`_: Fixed
|
||||||
|
issue with Cinder-backed images in A/A environment not correctly using
|
||||||
|
the cluster name.
|
Reference in New Issue
Block a user