[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 dbe34c08e2)
(cherry picked from commit 2fe7452b1b)
(cherry picked from commit bf97dcc9d4)
(cherry picked from commit cfdb200e6b)
(cherry picked from commit 1788cb4314)
This commit is contained in:
Douglas Viroel 2020-05-26 19:38:56 +00:00 committed by Tom Barron
parent eee6c4218f
commit 0b87677d79
2 changed files with 13 additions and 2 deletions

View File

@ -37,6 +37,7 @@ LOG = log.getLogger(__name__)
SUPPORTED_NETWORK_TYPES = (None, 'flat', 'vlan')
SEGMENTED_NETWORK_TYPES = ('vlan',)
DEFAULT_MTU = 1500
CLUSTER_IPSPACES = ('Cluster', 'Default')
class NetAppCmodeMultiSVMFileStorageLibrary(
@ -365,8 +366,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)

View File

@ -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 <https://launchpad.net/bugs/1880747>`_ for more
details.