Merge "Dell Powerflex: Add new VOLUME_ALREADY_MAPPED_ERROR"
This commit is contained in:
commit
f3b11ddf9e
@ -49,6 +49,7 @@ class ScaleIOConnector(base.BaseLinuxConnector):
|
||||
OK_STATUS_CODE = 200
|
||||
VOLUME_NOT_MAPPED_ERROR = 84
|
||||
VOLUME_ALREADY_MAPPED_ERROR = 81
|
||||
VOLUME_ALREADY_MAPPED_ERROR_v4 = 4037
|
||||
GET_GUID_OP_CODE = io('a', 14)
|
||||
RESCAN_VOLS_OP_CODE = io('a', 10)
|
||||
|
||||
@ -400,7 +401,8 @@ class ScaleIOConnector(base.BaseLinuxConnector):
|
||||
if r.status_code != self.OK_STATUS_CODE:
|
||||
response = r.json()
|
||||
error_code = response['errorCode']
|
||||
if error_code == self.VOLUME_ALREADY_MAPPED_ERROR:
|
||||
if error_code == self.VOLUME_ALREADY_MAPPED_ERROR or \
|
||||
error_code == self.VOLUME_ALREADY_MAPPED_ERROR_v4:
|
||||
LOG.warning(
|
||||
"Ignoring error mapping volume %(volume_name)s: "
|
||||
"volume already mapped.",
|
||||
|
@ -285,6 +285,15 @@ class ScaleIOConnectorTestCase(test_connector.ConnectorTestCase):
|
||||
|
||||
self.test_connect_volume()
|
||||
|
||||
def test_map_volume_already_mapped_v4(self):
|
||||
"""Ignore REST API failure for volume already mapped"""
|
||||
self.mock_calls[self.action_format.format(
|
||||
'addMappedSdc')] = self.MockHTTPSResponse(
|
||||
dict(errorCode=self.connector.VOLUME_ALREADY_MAPPED_ERROR_v4,
|
||||
message='Test error map volume'), 500)
|
||||
|
||||
self.test_connect_volume()
|
||||
|
||||
def test_error_disconnect_volume(self):
|
||||
"""Fail to disconnect with REST API failure"""
|
||||
self.mock_calls[self.action_format.format(
|
||||
|
9
releasenotes/notes/bug-2013749-3de9f827b82116a2.yaml
Normal file
9
releasenotes/notes/bug-2013749-3de9f827b82116a2.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
PowerFlex driver `Bug #2013749
|
||||
<https://bugs.launchpad.net/os-brick/+bug/2013749>`_: Added
|
||||
new error code for powerflex 4.x which was causing this error.
|
||||
Added handling for the new error code returned from
|
||||
Powerflex 4.x when a we try to map a volume which is already
|
||||
mapped.
|
Loading…
Reference in New Issue
Block a user