bagpipe: bagpipe-bgp does not start with EVPN and OVS driver

Bug #1883102 reported by Fedor Tarasenko on 2020-06-11
34
This bug affects 8 people
Affects Status Importance Assigned to Milestone
BaGPipe
Undecided
Lajos Katona

Bug Description

In Train bagpipe-bgp does not start having configuration with EVPN and dataplane_driver = ovs http://paste.openstack.org/show/794631/ with trace below http://paste.openstack.org/show/794630/.

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon [-] Error while starting BGP daemon: KeyError: 'os_ken_app'

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon Traceback (most recent call last):

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/bgp_daemon.py", line 98, in daemon_main

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon pecan_api = api.PecanAPI()

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/api/api.py", line 58, in __init__

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon app = setup_app()

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/api/api.py", line 43, in setup_app

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon guess_content_type_from_ext=True

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/pecan/__init__.py", line 86, in make_app

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon app = Pecan(root, **kw)

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/pecan/core.py", line 832, in __init__

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon super(Pecan, self).__init__(*args, **kw)

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/pecan/core.py", line 240, in __init__

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon root = self.__translate_root__(root)

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/pecan/core.py", line 275, in __translate_root__

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon module = __import__(name, fromlist=fromlist)

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/api/controllers.py", line 349, in <module>

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon class RootController(object):

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/api/controllers.py", line 362, in RootController

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon attach_localport = AttachController()

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/api/controllers.py", line 67, in __init__

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon self.manager = vpn_manager.VPNManager.get_instance()

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/vpn/manager.py", line 495, in get_instance

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon cls._create_instance()

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 328, in inner

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon return f(*args, **kwargs)

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/vpn/manager.py", line 481, in _create_instance

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon cls._instance = cls()

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/common/log_decorator.py", line 39, in wrapper

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon return method(*args, **kwargs)

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/vpn/manager.py", line 71, in __init__

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon self.dataplane_drivers = dp_drivers.instantiate_dataplane_drivers()

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/vpn/dataplane_drivers.py", line 88, in instantiate_dataplane_drivers

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon drivers[vpn_type] = driver_class()

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/vpn/evpn/ovs.py", line 248, in __init__

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon br_tun.OVSTunnelBridge(self.config.ovs_bridge)

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ofswitch.py", line 62, in __init__

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon self._app = kwargs.pop('os_ken_app')

2020-06-09 08:59:00.292 6 ERROR networking_bagpipe.bagpipe_bgp.bgp_daemon KeyError: 'os_ken_app'

Future investigation shows that https://opendev.org/openstack/networking-bagpipe/src/branch/stable/train/networking_bagpipe/bagpipe_bgp/vpn/evpn/ovs.py#L248 passes fewer options that expected. Same for master branch.

We get errors with stable/train neutron and these packages:
networking-bgpvpn==11.0.1
neutron-lib==1.29.1

description: updated
Changed in neutron:
assignee: nobody → Lajos Katona (lajos-katona)
Changed in neutron:
importance: Undecided → High
no longer affects: neutron
Changed in networking-bagpipe:
assignee: nobody → Slawek Kaplonski (slaweq)
assignee: Slawek Kaplonski (slaweq) → nobody
Lajos Katona (lajos-katona) wrote :

I can reproduce it on master as well.

Changed in networking-bagpipe:
status: New → Confirmed
assignee: nobody → Lajos Katona (lajos-katona)

Fix proposed to branch: master
Review: https://review.opendev.org/735934

Changed in networking-bagpipe:
status: Confirmed → In Progress
Lajos Katona (lajos-katona) wrote :

@ftarasenko: could you please check this? I have only a tiny devstack to test now, so not sure what I destroyed :-)
I ask somebody to check it with deeper os-ken knowledge.

Fedor Tarasenko (ftarasenko) wrote :

@lajos-katona: I can confirm that bagpipe-bgp starts with this patch applied. Thank you!

Fedor Tarasenko (ftarasenko) wrote :

@lajos-katona: futher working with module shows that after creating VPN, module fails with AttributeError: 'OVSDataplaneDriver' object has no attribute 'bridge'
More details in https://pastebin.com/1RNdtH5P

Lajos Katona (lajos-katona) wrote :

Hi Fedor,
Could you please check https://review.opendev.org/735934 , I think I made it work, at least in my local dummy environment.
Sorry for late answer.

David Espinel (davidespinel) wrote :

Hi Lajos,

I've implemented your proposed changes in a local deployment and I've encountered a fail when executing an attach_localport: An error ocurred during local port plug to VPN: AttributeError: 'OVSDataplaneDriver' object has no attribute 'tunnel_mgr'

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers