NetApp driver leaks ipspaces on vserver creation failure

Bug #1921054 reported by Goutham Pacha Ravi
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Triaged
Low
Carlos Eduardo

Bug Description

Description
===========
The NetApp ONTAP DHSS=True driver creates ipspaces on the fly and tags them with the neutron network subnet ID when Neutron network plugin is used [1]. It does a good job on reusing ipspaces associated with the same VLAN as the share network being used if one is present. However, it's possible that there are orphaned ipspaces that match the same name as the neutron subnet ID, but aren't associated with any VLANs yet. One possibility where this may occur is if the ONTAP Vserver creation or Vserver network setup fails before a VLAN association is made [2]. The failure is bubbled up, but the ipspace remains on the backend.

Users could end up in a bad place if they retry their share creation request since the driver sees this orphaned resource and fails on name conflict: http://paste.openstack.org/show/803838/

[1] https://opendev.org/openstack/manila/src/commit/50401393c74f65aee73db82f22eb531898bc68cf/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py#L234-L241
[2] https://opendev.org/openstack/manila/src/commit/50401393c74f65aee73db82f22eb531898bc68cf/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py#L243-L277

Steps to reproduce
==================

A chronological list of steps which will help reproduce the issue you hit:
* Follow steps to reproduce https://bugs.launchpad.net/manila/+bug/1921012
* Fix your issue there and retry creating a share with the same share network

Expected result
===============
I expect ONTAP to reuse the unused IPSpace (or have it cleaned up during the prior failure) so that ipspace conflicts don't occur when re-attempting share creation

Actual result
=============
Share is set to "error", because share server creation failed in the backend

Environment
===========
1. OpenStack Manila Train
2. NetApp ONTAP 9.x

tags: added: netapp
Vida Haririan (vhariria)
tags: added: low-hanging-fruit
Vida Haririan (vhariria)
Changed in manila:
importance: Undecided → Low
Changed in manila:
assignee: nobody → Carlos Eduardo (silvacarlose)
Revision history for this message
Vida Haririan (vhariria) wrote :
Vida Haririan (vhariria)
Changed in manila:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.