Using IPVPN OVS driver in bare MPLS use case with a patch port as MPLS interface, result in throwing an exception:
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: DEBUG networking_bagpipe.bagpipe_bgp.vpn.ipvpn.mpls_ovs_dataplane [-] Running command in subshell mode: cat /sys/class/net/patch-to-ex/address {{(pid=23122) run_command /opt/stack/ne
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: DEBUG networking_bagpipe.bagpipe_bgp.vpn.ipvpn.mpls_ovs_dataplane [-] run_command stderr: cat: /sys/class/net/patch-to-ex/address: No such file or directory {{(pid=23122) _log_stdx_
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.vpn.ipvpn.mpls_ovs_dataplane [-] Exit code 1 when running 'cat /sys/class/net/patch-to-ex/address'
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.vpn.ipvpn.mpls_ovs_dataplane [-] run_command stderr: cat: /sys/class/net/patch-to-ex/address: No such file or directory
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: DEBUG networking_bagpipe.bagpipe_bgp.vpn.ipvpn.mpls_ovs_dataplane [-] Running command in subshell mode: cat /sys/class/net/<networking_bagpipe.bagpipe_bgp.common.dataplane_utils.OVSBr
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: DEBUG networking_bagpipe.bagpipe_bgp.vpn.ipvpn.mpls_ovs_dataplane [-] run_command stderr: /bin/sh: 1: cannot open networking_bagpipe.bagpipe_bgp.common.dataplane_utils.OVSBridgeWith
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.vpn.ipvpn.mpls_ovs_dataplane [-] Exit code 2 when running 'cat /sys/class/net/<networking_bagpipe.bagpipe_bgp.common.dataplane_utils.OVSBridgeWith
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.vpn.ipvpn.mpls_ovs_dataplane [-] run_command stderr: /bin/sh: 1: cannot open networking_bagpipe.bagpipe_bgp.common.dataplane_utils.OVSBridgeWith
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.vpn.ipvpn.mpls_ovs_dataplane [-] Exception while initializing dataplane state: Exit code 2 when running 'cat /sys/class/net/<networking_bagpipe.ba
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers [-] attach_localport: An error occurred during local port plug to VPN: Exception: Exit code 2 when running 'cat /sys/class/net/<ne
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers Traceback (most recent call last):
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/api/controllers.py", line 217, in process
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers self.manager.plug_vif_to_vpn(**attach_params)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/common/log_decorator.py", line 39, in wrapper
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers return method(*args, **kwargs)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/vpn/manager.py", line 360, in plug_vif_to_vpn
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers fallback, **kwargs)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/common/utils.py", line 31, in synchronized_method
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers return method(self, *arg, **kws)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/common/log_decorator.py", line 39, in wrapper
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers return method(*args, **kwargs)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/vpn/manager.py", line 269, in _get_vpn_instance
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers fallback, **kwargs)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/common/log_decorator.py", line 39, in wrapper
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers return method(*args, **kwargs)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/vpn/ipvpn/__init__.py", line 78, in __init__
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers vpn_instance.VPNInstance.__init__(self, *args, **kwargs)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/common/log_decorator.py", line 39, in wrapper
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers return method(*args, **kwargs)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/vpn/vpn_instance.py", line 333, in __init__
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers self.gateway_ip, self.network_plen, self.instance_label, **kwargs)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/common/log_decorator.py", line 39, in wrapper
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers return method(*args, **kwargs)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/vpn/dataplane_drivers.py", line 205, in initialize_dataplane_
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers self.initialize()
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/vpn/ipvpn/mpls_ovs_dataplane.py", line 1126, in initialize
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers self.bridge)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/common/net_utils.py", line 31, in get_device_mac
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers (command_prefix, dev_name))
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/vpn/dataplane_drivers.py", line 250, in _run_command
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers *args, **kwargs)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers File "/opt/stack/networking-bagpipe/networking_bagpipe/bagpipe_bgp/common/run_command.py", line 145, in run_command
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers raise Exception(message)
mars 06 11:08:03 l-navi-tessa bagpipe-bgp[23122]: ERROR networking_bagpipe.bagpipe_bgp.api.controllers Exception: Exit code 2 when running 'cat /sys/class/net/<networking_bagpipe.bagpipe_bgp.common.dataplane_utils.OVSBridgeWithGroups
This exception is due to use self.bridge instead of self.bridge.br_name at https://github.com/openstack/networking-bagpipe/blob/master/networking_bagpipe/bagpipe_bgp/vpn/ipvpn/mpls_ovs_dataplane.py#L1126
Fix proposed to branch: master /review. openstack. org/643884
Review: https:/