Merge "HPE 3par: PP - Return LUN ids from both arrays"
This commit is contained in:
commit
6715c2180e
@ -7664,8 +7664,17 @@ class TestHPE3PARFCDriver(HPE3PARBaseDriver):
|
||||
'volumeName': self.VOLUME_3PAR_NAME,
|
||||
'remoteName': self.wwn[0],
|
||||
'lun': 90, 'type': 0}]]
|
||||
mock_replicated_client.getHostVLUNs.side_effect = (
|
||||
mock_client.getHostVLUNs.side_effect)
|
||||
|
||||
mock_replicated_client.getHostVLUNs.side_effect = [
|
||||
hpeexceptions.HTTPNotFound('fake'),
|
||||
[{'active': True,
|
||||
'volumeName': self.VOLUME_3PAR_NAME,
|
||||
'remoteName': self.wwn[1],
|
||||
'lun': 80, 'type': 0}],
|
||||
[{'active': True,
|
||||
'volumeName': self.VOLUME_3PAR_NAME,
|
||||
'remoteName': self.wwn[0],
|
||||
'lun': 80, 'type': 0}]]
|
||||
|
||||
location = ("%(volume_name)s,%(lun_id)s,%(host)s,%(nsp)s" %
|
||||
{'volume_name': self.VOLUME_3PAR_NAME,
|
||||
@ -7673,15 +7682,23 @@ class TestHPE3PARFCDriver(HPE3PARBaseDriver):
|
||||
'host': self.FAKE_HOST,
|
||||
'nsp': 'something'})
|
||||
mock_client.createVLUN.return_value = location
|
||||
mock_replicated_client.createVLUN.return_value = location
|
||||
|
||||
location_peer = ("%(volume_name)s,%(lun_id)s,%(host)s,%(nsp)s" %
|
||||
{'volume_name': self.VOLUME_3PAR_NAME,
|
||||
'lun_id': 80,
|
||||
'host': self.FAKE_HOST,
|
||||
'nsp': 'something'})
|
||||
mock_replicated_client.createVLUN.return_value = location_peer
|
||||
|
||||
primary_luns = [90, 90]
|
||||
peer_luns = [80, 80]
|
||||
expected_properties = {
|
||||
'driver_volume_type': 'fibre_channel',
|
||||
'data': {
|
||||
'encrypted': False,
|
||||
'target_lun': 90,
|
||||
'target_wwn': ['0987654321234', '123456789000987',
|
||||
'0987654321234', '123456789000987'],
|
||||
'target_luns': primary_luns + peer_luns,
|
||||
'target_discovered': True,
|
||||
'initiator_target_map':
|
||||
{'123456789012345': ['0987654321234', '123456789000987',
|
||||
|
@ -115,10 +115,11 @@ class HPE3PARFCDriver(hpebasedriver.HPE3PARDriverBase):
|
||||
failover. bug #1773069
|
||||
4.0.6 - Set NSP for single path attachments. Bug #1809249
|
||||
4.0.7 - Added Peer Persistence feature
|
||||
4.0.8 - For PP, return LUN ids from both arrays. Bug #2044255
|
||||
|
||||
"""
|
||||
|
||||
VERSION = "4.0.7"
|
||||
VERSION = "4.0.8"
|
||||
|
||||
# The name of the CI wiki page.
|
||||
CI_WIKI_NAME = "HPE_Storage_CI"
|
||||
@ -279,9 +280,16 @@ class HPE3PARFCDriver(hpebasedriver.HPE3PARDriverBase):
|
||||
|
||||
common._destroy_replication_client(remote_client)
|
||||
|
||||
len_main_wwn = len(info['data']['target_wwn'])
|
||||
target_luns = []
|
||||
target_luns = [info['data']['target_lun']] * len_main_wwn
|
||||
|
||||
len_backup_wwn = len(info_peer['data']['target_wwn'])
|
||||
target_luns += [info_peer['data']['target_lun']] * len_backup_wwn
|
||||
|
||||
info = {'driver_volume_type': 'fibre_channel',
|
||||
'data': {'encrypted': info['data']['encrypted'],
|
||||
'target_lun': info['data']['target_lun'],
|
||||
'target_luns': target_luns,
|
||||
'target_discovered': True,
|
||||
'target_wwn': info['data']['target_wwn'] +
|
||||
info_peer['data']['target_wwn'],
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
HPE 3PAR driver `bug #2044255
|
||||
<https://bugs.launchpad.net/cinder/+bug/2044255>`_:
|
||||
Fixed: In peer persistence setup, when volume is attached to instance,
|
||||
now LUN ids are returned from both the arrays.
|
||||
|
Loading…
Reference in New Issue
Block a user