[NetApp] Fix race condition issue in NetApp driver
This patch fixes the concurrency in the NetApp driver between the method setup_server and teardown_server by doing the teardown_server method lock the needed resources correctly. Closes-bug: #1816640 Change-Id: I7d56384e77b7e18b3c95f182c0a01af82e5fa5a5
This commit is contained in:
parent
1efbf6f0c6
commit
96d6869dd6
@ -363,9 +363,13 @@ class NetAppCmodeMultiSVMFileStorageLibrary(
|
||||
interfaces_on_vlans.append(interface)
|
||||
vlans.append(interface['home-port'])
|
||||
|
||||
vlans = '-'.join(sorted(set(vlans))) if vlans else None
|
||||
if vlans:
|
||||
vlans = '-'.join(sorted(set(vlans))) if vlans else None
|
||||
vlan_id = vlans.split('-')[-1]
|
||||
else:
|
||||
vlan_id = None
|
||||
|
||||
@utils.synchronized('netapp-VLANs-%s' % vlans, external=True)
|
||||
@utils.synchronized('netapp-VLAN-%s' % vlan_id, external=True)
|
||||
def _delete_vserver_with_lock():
|
||||
self._client.delete_vserver(vserver,
|
||||
vserver_client,
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed an issue with the NetApp driver leaving leftover
|
||||
resources when it was handling too many share server
|
||||
creation and deletion requests in parallel.
|
Loading…
x
Reference in New Issue
Block a user