NetApp: iSCSI/FC detach operation fails when multiple initiators connected
During the detach operation of iSCSI and Fibre Channel (FC) sessions, the process fails when multiple initiators are connected to LUNS. Investigation reveals that the root cause is related to improper handling of initiator identifiers due to the use of a space character as a delimiter. Specifically, the NetApp's REST API expects initiator IDs to be parsed and processed as distinct entities. However, when multiple initiators are listed or passed as a single string separated by spaces, the parsing logic incorrectly splits or merges these identifiers. This results in failure to correctly identify and detach each initiator session, causing the overall detach operation to fail. To fix the above, updated the delimeter from space character to comma. Closes-Bug: #2114993 Change-Id: Ia143e729a3e84e22fcecf6f5bac8b0b3ae311553 Signed-off-by: Saikumar Pulluri <saikumar1016@gmail.com>
This commit is contained in:
@@ -1894,7 +1894,7 @@ class NetAppRestCmodeClientTestCase(test.TestCase):
|
||||
|
||||
expected_query = {
|
||||
'svm.name': fake_client.VOLUME_VSERVER_NAME,
|
||||
'initiators.name': ' '.join(initiators),
|
||||
'initiators.name': ','.join(initiators),
|
||||
'fields': 'name,protocol,os_type'
|
||||
}
|
||||
|
||||
@@ -1919,7 +1919,7 @@ class NetAppRestCmodeClientTestCase(test.TestCase):
|
||||
|
||||
expected_query = {
|
||||
'svm.name': fake_client.VOLUME_VSERVER_NAME,
|
||||
'initiators.name': ' '.join(initiators),
|
||||
'initiators.name': ','.join(initiators),
|
||||
'fields': 'name,protocol,os_type'
|
||||
}
|
||||
|
||||
@@ -2180,7 +2180,7 @@ class NetAppRestCmodeClientTestCase(test.TestCase):
|
||||
self.assertTrue(self.client.has_luns_mapped_to_initiators(initiators))
|
||||
|
||||
query = {
|
||||
'initiators.name': ' '.join(initiators),
|
||||
'initiators.name': ','.join(initiators),
|
||||
'fields': 'lun_maps'
|
||||
}
|
||||
|
||||
@@ -2196,7 +2196,7 @@ class NetAppRestCmodeClientTestCase(test.TestCase):
|
||||
self.assertFalse(self.client.has_luns_mapped_to_initiators(initiators))
|
||||
|
||||
query = {
|
||||
'initiators.name': ' '.join(initiators),
|
||||
'initiators.name': ','.join(initiators),
|
||||
'fields': 'lun_maps'
|
||||
}
|
||||
|
||||
@@ -2212,7 +2212,7 @@ class NetAppRestCmodeClientTestCase(test.TestCase):
|
||||
self.assertFalse(self.client.has_luns_mapped_to_initiators(initiators))
|
||||
|
||||
query = {
|
||||
'initiators.name': ' '.join(initiators),
|
||||
'initiators.name': ','.join(initiators),
|
||||
'fields': 'lun_maps'
|
||||
}
|
||||
|
||||
|
@@ -1434,7 +1434,7 @@ class RestClient(object, metaclass=volume_utils.TraceWrapperMetaclass):
|
||||
|
||||
query = {
|
||||
'svm.name': self.vserver,
|
||||
'initiators.name': ' '.join(initiator_list),
|
||||
'initiators.name': ','.join(initiator_list),
|
||||
'fields': 'name,protocol,os_type'
|
||||
}
|
||||
|
||||
@@ -1587,7 +1587,7 @@ class RestClient(object, metaclass=volume_utils.TraceWrapperMetaclass):
|
||||
def has_luns_mapped_to_initiators(self, initiator_list):
|
||||
"""Checks whether any LUNs are mapped to the given initiator(s)."""
|
||||
query = {
|
||||
'initiators.name': ' '.join(initiator_list),
|
||||
'initiators.name': ','.join(initiator_list),
|
||||
'fields': 'lun_maps'
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
NetApp Driver `bug #2114993
|
||||
<https://bugs.launchpad.net/cinder/+bug/2114993>`_: Fixed iSCSI and FC
|
||||
detach operation failure issue when multiple initiators are connected.
|
Reference in New Issue
Block a user