From 2fe7452b1bf8b8975dcd663db3ecce98b5fb499c Mon Sep 17 00:00:00 2001 From: Douglas Viroel Date: Tue, 26 May 2020 19:38:56 +0000 Subject: [PATCH] [NetApp] Fix default ipspace deletion issue The NetApp driver is fixed to avoid the deletion of cluster ipspaces when deleting a share server. Now the share server deletion skip ipspace removal if the ipspace is one of the following: Cluster or Default. Change-Id: I24cda6be69ef9258c6c637be48be32b93d835e0a Closes-Bug: #1880747 (cherry picked from commit dbe34c08e2278eb472bc2cbf7f086d6deff7cab2) --- .../netapp/dataontap/cluster_mode/lib_multi_svm.py | 6 ++++-- ...x-do-not-delete-default-ipspace-aee638279e0f8e93.yaml | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/bug-1880747-netapp-fix-do-not-delete-default-ipspace-aee638279e0f8e93.yaml 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 3b94edc5f5..d80cfe10cd 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 @@ -40,6 +40,7 @@ LOG = log.getLogger(__name__) SUPPORTED_NETWORK_TYPES = (None, 'flat', 'vlan') SEGMENTED_NETWORK_TYPES = ('vlan',) DEFAULT_MTU = 1500 +CLUSTER_IPSPACES = ('Cluster', 'Default') class NetAppCmodeMultiSVMFileStorageLibrary( @@ -393,8 +394,9 @@ class NetAppCmodeMultiSVMFileStorageLibrary( vserver_client, security_services=security_services) - if ipspace_name and not self._client.ipspace_has_data_vservers( - ipspace_name): + if (ipspace_name and ipspace_name not in CLUSTER_IPSPACES + and not self._client.ipspace_has_data_vservers( + ipspace_name)): self._client.delete_ipspace(ipspace_name) self._delete_vserver_vlans(interfaces_on_vlans) diff --git a/releasenotes/notes/bug-1880747-netapp-fix-do-not-delete-default-ipspace-aee638279e0f8e93.yaml b/releasenotes/notes/bug-1880747-netapp-fix-do-not-delete-default-ipspace-aee638279e0f8e93.yaml new file mode 100644 index 0000000000..282d80ba83 --- /dev/null +++ b/releasenotes/notes/bug-1880747-netapp-fix-do-not-delete-default-ipspace-aee638279e0f8e93.yaml @@ -0,0 +1,9 @@ +--- +fixes: + - | + NetApp ONTAP driver is now fixed to avoid the deletion of `Cluster` and + `Default` ipspaces when deleting a share server. This issue was happening + only when operating in `driver_handles_share_servers` enabled mode and + creating shares using `flat` network type. See + `Launchpad bug 1880747 `_ for more + details.