Openstack Neutron: again bugs of python coders – ethernet via infiniband

If you want use ethernet network on computation nodes via Infiniband network infrastructure for flat type or for bridges, so you will failed.
Obviously, again low level of coders of python of component Neutron.
All code of Neutron (as and all OpenStack) it is just big set of wrapper python scripts around usual linux tools.
In context Neutron and in this particular case python code of ‘linuxbridge’ script just makes primitive “parsing” of standard output of shell commands – ‘ip link show’!!)) . And this code seeks only small string – ‘link/ether’. But it is not correctly!
As transient variant, in this case of architecture, need check also and ‘link/infiniband’ as minimum.

Below small code of patch ))

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 55 --- /usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py.orig 2018-01-09 22:54:17.582435386 +0300
 56 +++ /usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py      2018-01-10 00:32:52.776076711 +0300
 57 @@ -522,7 +522,16 @@
 58
 59      @property
 60      def address(self):
 61 -        return self.attributes.get('link/ether')
 62 +        if {'link/ether'}.issubset(self.attributes):
 63 +             mac_address = self.attributes.get('link/ether')
 64 +             LOG.debug("MAC address of %s: [%s]", 'link/ether', mac_address)
 65 +             return mac_address
 66 +        elif {'link/infiniband'}.issubset(self.attributes):
 67 +             mac_address = self.attributes.get('link/infiniband')
 68 +             LOG.debug("MAC address of %s: [%s]", 'link/infiniband', mac_address)
 69 +             return mac_address
 70
 71      @property
 72      def state(self):
 73

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Scroll to top