add netapp copyoffload provider location

By volume creation the volume database entry is created with the field provider_location = null.
When cinder tries to register an image-cache from the new volume it gets the volume information
from the database and can not derive the mountpoint for "None".
This fix will set the provider location to prevent the error mentioned in the issue.

Closes-Bug: 1965952
Change-Id: I0fe11542d2d5440d1048d388e7a7b09055cf3af8
This commit is contained in:
Friedrich Hiekel 2022-03-23 09:14:42 +01:00
parent 451d326720
commit f9c926fe40
2 changed files with 7 additions and 0 deletions

View File

@ -639,6 +639,8 @@ class NetAppCmodeNfsDriver(nfs_base.NetAppNfsDriver,
copied = True
elif (cache_copy and
self.configuration.netapp_copyoffload_tool_path):
volume['provider_location'] = volume_utils.extract_host(
volume['host'], level='pool')
LOG.debug("Trying copy from cache using copy offload.")
self._copy_from_remote_cache(volume, image_id, cache_copy)
copied = True

View File

@ -0,0 +1,5 @@
---
fixes:
- |
`Bug #1953168 <https://bugs.launchpad.net/cinder/+bug/1965952>`_:
add netapp copyoffload provider location