Browse Source

Fix VXLAN iSER Bond issue

Change-Id: Ide0763d3a44c84019e2f8aab88a15f053bd1d1bf
tags/fuel8_cx5
Hamdy Khader 2 years ago
parent
commit
f6a6cb4a4e
1 changed files with 14 additions and 3 deletions
  1. 14
    3
      deployment_scripts/mellanox_settings.py

+ 14
- 3
deployment_scripts/mellanox_settings.py View File

@@ -105,7 +105,6 @@ class MellanoxSettings(object):
105 105
 
106 106
         drivers_set = list(set(drivers))
107 107
         interfaces_set = list(set(interfaces))
108
-
109 108
         if (len(drivers_set) > 1):
110 109
              logging.error("Multiple ConnectX adapters was found in this environment.")
111 110
              raise MellanoxSettingsException(
@@ -124,6 +123,8 @@ class MellanoxSettings(object):
124 123
                 mlnx['cx_card'] = 'none'
125 124
                 logging.error('Failed executing ibdev2netdev')
126 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 128
               interface_line = [l for l in ibdev if mellanox_interface in l]
128 129
               if interface_line and 'mlx5' in interface_line.pop():
129 130
                   mlnx['cx_card'] = 'ConnectX-4'
@@ -167,7 +168,16 @@ class MellanoxSettings(object):
167 168
                 )
168 169
             mlnx['physical_port'] = interfaces[private_ifc]['vendor_specific']['bus_info']
169 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 182
     @classmethod
173 183
     def add_storage_vlan(cls):
@@ -483,7 +493,7 @@ class MellanoxSettings(object):
483 493
                              cls.data['bonds'][interface]['driver']
484 494
                          if ( network_type == 'private' and cls.is_sriov_enabled() ) or \
485 495
                              ( network_type == 'storage' and cls.is_iser_enabled() ):
486
-                             
496
+
487 497
                              # Assign SR-IOV/ISER to the first port only.
488 498
                              # This is a temporary workaround until supporing bond over VFs.
489 499
                              # We sort the array of interfaces in order to get the first
@@ -522,3 +532,4 @@ def main():
522 532
 
523 533
 if __name__ == '__main__':
524 534
     main()
535
+

Loading…
Cancel
Save