From f9c926fe407ebf3fc8c97e6f02b45c4d32e8c493 Mon Sep 17 00:00:00 2001 From: Friedrich Hiekel Date: Wed, 23 Mar 2022 09:14:42 +0100 Subject: [PATCH] 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 --- cinder/volume/drivers/netapp/dataontap/nfs_cmode.py | 2 ++ releasenotes/notes/bug-b3c37df596c7a632.yaml | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 releasenotes/notes/bug-b3c37df596c7a632.yaml diff --git a/cinder/volume/drivers/netapp/dataontap/nfs_cmode.py b/cinder/volume/drivers/netapp/dataontap/nfs_cmode.py index 0cccbef649f..3ac0738d901 100644 --- a/cinder/volume/drivers/netapp/dataontap/nfs_cmode.py +++ b/cinder/volume/drivers/netapp/dataontap/nfs_cmode.py @@ -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 diff --git a/releasenotes/notes/bug-b3c37df596c7a632.yaml b/releasenotes/notes/bug-b3c37df596c7a632.yaml new file mode 100644 index 00000000000..17c87faa56a --- /dev/null +++ b/releasenotes/notes/bug-b3c37df596c7a632.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + `Bug #1953168 `_: + add netapp copyoffload provider location