summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHamdy Khader <hamdyk@mellanox.com>2016-09-29 12:30:53 +0300
committerHamdy Khader <hamdyk@mellanox.com>2016-10-05 16:19:56 +0300
commitf6a6cb4a4e76606c9864a319d1218c8885940911 (patch)
tree32f44613b65680fbb3d8a3720357c5d37d59fff5
parentfc918d5ce2539db1b717bf56e2c72d6fbc32da7c (diff)
Fix VXLAN iSER Bond issue
Notes
Notes (review): Code-Review+2: Aviram Bar-Haim <aviramb@mellanox.com> Workflow+1: Aviram Bar-Haim <aviramb@mellanox.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 05 Oct 2016 13:25:36 +0000 Reviewed-on: https://review.openstack.org/379313 Project: openstack/fuel-plugin-mellanox Branch: refs/heads/master
-rwxr-xr-xdeployment_scripts/mellanox_settings.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/deployment_scripts/mellanox_settings.py b/deployment_scripts/mellanox_settings.py
index 1f2462b..795e171 100755
--- a/deployment_scripts/mellanox_settings.py
+++ b/deployment_scripts/mellanox_settings.py
@@ -105,7 +105,6 @@ class MellanoxSettings(object):
105 105
106 drivers_set = list(set(drivers)) 106 drivers_set = list(set(drivers))
107 interfaces_set = list(set(interfaces)) 107 interfaces_set = list(set(interfaces))
108
109 if (len(drivers_set) > 1): 108 if (len(drivers_set) > 1):
110 logging.error("Multiple ConnectX adapters was found in this environment.") 109 logging.error("Multiple ConnectX adapters was found in this environment.")
111 raise MellanoxSettingsException( 110 raise MellanoxSettingsException(
@@ -124,6 +123,8 @@ class MellanoxSettings(object):
124 mlnx['cx_card'] = 'none' 123 mlnx['cx_card'] = 'none'
125 logging.error('Failed executing ibdev2netdev') 124 logging.error('Failed executing ibdev2netdev')
126 return 0 125 return 0
126 if ('bonds' in cls.data and mellanox_interface.startswith('bond')):
127 mellanox_interface = cls.data['bonds'][mellanox_interface]['interfaces'][0]
127 interface_line = [l for l in ibdev if mellanox_interface in l] 128 interface_line = [l for l in ibdev if mellanox_interface in l]
128 if interface_line and 'mlx5' in interface_line.pop(): 129 if interface_line and 'mlx5' in interface_line.pop():
129 mlnx['cx_card'] = 'ConnectX-4' 130 mlnx['cx_card'] = 'ConnectX-4'
@@ -167,7 +168,16 @@ class MellanoxSettings(object):
167 ) 168 )
168 mlnx['physical_port'] = interfaces[private_ifc]['vendor_specific']['bus_info'] 169 mlnx['physical_port'] = interfaces[private_ifc]['vendor_specific']['bus_info']
169 elif mlnx['driver'] == MLNX_DRIVERS_LIST[mlnx['cx_card']]['eth_driver']: 170 elif mlnx['driver'] == MLNX_DRIVERS_LIST[mlnx['cx_card']]['eth_driver']:
170 mlnx['physical_port'] = private_ifc 171
172 # If only iSER
173 if not cls.is_sriov_enabled() and cls.is_iser_enabled():
174 mlnx = cls.get_mlnx_section()
175 storage_ifc = cls.get_interface_by_network('storage')
176 mlnx['physical_port'] = storage_ifc
177
178 # If SR-IOV
179 else:
180 mlnx['physical_port'] = private_ifc
171 181
172 @classmethod 182 @classmethod
173 def add_storage_vlan(cls): 183 def add_storage_vlan(cls):
@@ -483,7 +493,7 @@ class MellanoxSettings(object):
483 cls.data['bonds'][interface]['driver'] 493 cls.data['bonds'][interface]['driver']
484 if ( network_type == 'private' and cls.is_sriov_enabled() ) or \ 494 if ( network_type == 'private' and cls.is_sriov_enabled() ) or \
485 ( network_type == 'storage' and cls.is_iser_enabled() ): 495 ( network_type == 'storage' and cls.is_iser_enabled() ):
486 496
487 # Assign SR-IOV/ISER to the first port only. 497 # Assign SR-IOV/ISER to the first port only.
488 # This is a temporary workaround until supporing bond over VFs. 498 # This is a temporary workaround until supporing bond over VFs.
489 # We sort the array of interfaces in order to get the first 499 # We sort the array of interfaces in order to get the first
@@ -522,3 +532,4 @@ def main():
522 532
523if __name__ == '__main__': 533if __name__ == '__main__':
524 main() 534 main()
535