diff --git a/manila/share/drivers/dell_emc/plugins/unity/connection.py b/manila/share/drivers/dell_emc/plugins/unity/connection.py index baff0addb9..6ed31c1836 100644 --- a/manila/share/drivers/dell_emc/plugins/unity/connection.py +++ b/manila/share/drivers/dell_emc/plugins/unity/connection.py @@ -44,9 +44,10 @@ from manila import utils 8.0.0 - Supports manage/unmanage share server/share/snapshot 9.0.0 - Implements default filter function 9.0.1 - Bugfix: remove enable ace process when creating cifs share + 9.0.2 - Bugfix: fix the driver startup issue with LACP ports configured """ -VERSION = "9.0.1" +VERSION = "9.0.2" LOG = log.getLogger(__name__) SUPPORTED_NETWORK_TYPES = (None, 'flat', 'vlan') diff --git a/manila/share/drivers/dell_emc/plugins/unity/utils.py b/manila/share/drivers/dell_emc/plugins/unity/utils.py index 433918906d..efb76f896b 100644 --- a/manila/share/drivers/dell_emc/plugins/unity/utils.py +++ b/manila/share/drivers/dell_emc/plugins/unity/utils.py @@ -61,7 +61,12 @@ def match_ports(ports_list, port_ids_conf): port_id = port.get_id() for pattern in patterns: if fnmatch.fnmatchcase(port_id, pattern): - sp_id = port.parent_storage_processor.get_id() + # parentStorageProcessor property is deprecated in Unity 5.x + if port.parent_storage_processor: + sp = port.parent_storage_processor + else: + sp = port.storage_processor + sp_id = sp.get_id() ports_set = sp_ports_map.setdefault(sp_id, set()) ports_set.add(port_id) break diff --git a/manila/tests/share/drivers/dell_emc/plugins/unity/test_utils.py b/manila/tests/share/drivers/dell_emc/plugins/unity/test_utils.py index 709481300b..84fc723676 100644 --- a/manila/tests/share/drivers/dell_emc/plugins/unity/test_utils.py +++ b/manila/tests/share/drivers/dell_emc/plugins/unity/test_utils.py @@ -54,6 +54,24 @@ SPA_LA1 = MockPort(SPA, 'spa_la_1', 1500) SPB_LA1 = MockPort(SPB, 'spb_la_1', 1500) +class MockPortV5(object): + def __init__(self, sp, port_id, mtu): + self._sp = sp + self.port_id = port_id + self.mtu = mtu + + def get_id(self): + return self.port_id + + @property + def storage_processor(self): + return self._sp + + +SPA_LA2 = MockPort(SPA, 'spa_la_2', 1500) +SPB_LA2 = MockPort(SPB, 'spb_la_2', 1500) + + @ddt.ddt class TestUtils(test.TestCase): @ddt.data({'matcher': None, @@ -96,6 +114,10 @@ class TestUtils(test.TestCase): 'ids_conf': ['spa*'], 'port_map': {'spa': {'spa_eth0', 'spa_eth1'}}, 'unmanaged': {'spb_eth0'}}, + {'ports': [SPA_LA2, SPB_LA2], + 'ids_conf': None, + 'port_map': {'spa': {'spa_la_2'}, 'spb': {'spb_la_2'}}, + 'unmanaged': set()}, ) @ddt.unpack def test_match_ports(self, ports, ids_conf, port_map, unmanaged): diff --git a/releasenotes/notes/bug-2020745-dell-unity-lacp-8653da49ad901c5c.yaml b/releasenotes/notes/bug-2020745-dell-unity-lacp-8653da49ad901c5c.yaml new file mode 100644 index 0000000000..b3502a679b --- /dev/null +++ b/releasenotes/notes/bug-2020745-dell-unity-lacp-8653da49ad901c5c.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Dell Unity Driver `Bug #2020745 + `_: + Fixed driver startup issue with link aggregation configured.