diff --git a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py index c89b5e0ee3..504870f237 100644 --- a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py +++ b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py @@ -1266,7 +1266,7 @@ class NetAppCmodeMultiSVMFileStorageLibrary( if (dest_client.is_svm_migrate_supported() and src_client.is_svm_migrate_supported()): source_share_server_name = self._get_vserver_name( - source_share_server['id']) + source_share_server['identifier']) # Check if the migration is supported. try: @@ -1505,7 +1505,7 @@ class NetAppCmodeMultiSVMFileStorageLibrary( # Prepare the migration request. src_cluster_name = src_client.get_cluster_name() source_share_server_name = self._get_vserver_name( - source_share_server['id']) + source_share_server['identifier']) # 3. Send the migration request to ONTAP. try: diff --git a/manila/tests/share/drivers/netapp/dataontap/fakes.py b/manila/tests/share/drivers/netapp/dataontap/fakes.py index 4181d11b78..e80fe0455f 100644 --- a/manila/tests/share/drivers/netapp/dataontap/fakes.py +++ b/manila/tests/share/drivers/netapp/dataontap/fakes.py @@ -571,6 +571,7 @@ NETWORK_INFO_NETMASK = '255.255.255.0' SHARE_SERVER = { 'id': 'fake_id', 'share_network_id': 'c5b3a865-56d0-4d88-abe5-879965e099c9', + 'identifier': 'fake_id', 'backend_details': { 'vserver_name': VSERVER1 }, diff --git a/releasenotes/notes/bug-2037109-netapp-use-identifier-to-derive-vserver-name-during-migration-81fd7d24b36b4dbe.yaml b/releasenotes/notes/bug-2037109-netapp-use-identifier-to-derive-vserver-name-during-migration-81fd7d24b36b4dbe.yaml new file mode 100644 index 0000000000..d2f3860db0 --- /dev/null +++ b/releasenotes/notes/bug-2037109-netapp-use-identifier-to-derive-vserver-name-during-migration-81fd7d24b36b4dbe.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + NetApp ONTAP driver during migration uses share server id which was causing + failure for migrate a share server that had been migrated before. Fixed it + by using share server identifier instead of id. Please refer to the + `Launchpad bug #2037109 `_ + for more details.