neutron-dynamic-routing bgp agent should have options for MP-BGP

Bug #1784590 reported by Tobias Urdin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Wishlist
Ryan Tidwell

Bug Description

neutron-dynamic-routing

The implementation of BGP with Ryu supports IPv4 and IPv6 peers but the MP-BGP capabilities is announced based on if the peer is a v4 or v6 address.

If you want to use a IPv4 peer but announce IPv6 prefixes this will not work because in services/bgp/agent/driver/ryu/driver.py in the function add_bgp_peer() it disables the IPv6 MP-BGP capability if the peer IP is a IPv4 address.

This should be extended to support setting the capabilities manually, if you change the enable_ipv6 variable in the add_bgp_peer() function to True it will correctly announce IPv6 prefixes over the IPv4 BGP peer if the upstream router (the other side) supports the MP-BGP IPv6 capability.

Should be easy to implement with a "mode" config option that can be set to auto or manual and then options to override the capabilities.

Revision history for this message
Miguel Lavalle (minsel) wrote :

Hi Tobias,

It sounds to me that you have implemented / tested the solution you propose here? Is that the case?

Changed in neutron:
importance: Undecided → Wishlist
tags: added: rfe
Revision history for this message
IWAMOTO Toshihiro (iwamoto) wrote :

IIRC, the way the agent works today is due to no hint to enable MP-BGP other than peer address protocol family.
I'm not sure it should be a config option or some new DB field.
Ryu should have no problem advertising ipv6 route over ipv4.

Revision history for this message
Tobias Urdin (tobias-urdin) wrote :

I'm unsure what the best proposed solution would be, the two I see is:

* Add configuration options
* Change default value

What issues could be caused by just enabling the IPv6 capability by default? If the neighbor doesn't support IPv6 over IPv4 peers it will be negotiated and not work anyway right?

My change was simply from False to True on this line https://github.com/openstack/neutron-dynamic-routing/blob/master/neutron_dynamic_routing/services/bgp/agent/driver/ryu/driver.py#L131

Revision history for this message
Ryan Tidwell (ryan-tidwell) wrote :

Let me set this up and play with it. This could be a bug with an easy fix as Tobias suggests. There's no reason to not support IPv4 peering to announce IPv6 prefixes, let me see if I can reproduce the issue reported here.

Revision history for this message
Tobias Urdin (tobias-urdin) wrote :

Thanks Ryan,

I think we should be fine enabling all capabilities that Ryu supports by default or if we want
to introduce some kind of configuration.

Best regards

Revision history for this message
Ryan Tidwell (ryan-tidwell) wrote :

I was able to reproduce this behavior. I think in all cases we want to allow announcement of both address families, so enable_ipv4 and enable_ipv6 should always be True. For the sake of simplicity, I would just enable all capabilities in neutron and not even make it configurable. If the peer doesn't support a capability, I think that is the concern of the peer not neutron. I'll push a patch for this.

Revision history for this message
Ryan Tidwell (ryan-tidwell) wrote :

I forgot to mention that some functional tests here would be helpful in ensuring we handle capabilities correctly on the neutron side, so I'll look into that.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-dynamic-routing (master)

Fix proposed to branch: master
Review: https://review.openstack.org/608302

Changed in neutron:
assignee: nobody → Ryan Tidwell (ryan-tidwell)
status: New → In Progress
Revision history for this message
Miguel Lavalle (minsel) wrote :

So let's make this official and discuss it in the drivers meeting

tags: added: rfe-triaged
removed: rfe
Revision history for this message
Slawek Kaplonski (slaweq) wrote :

We agreed on drivers meeting to approve this RFE as it's even more like a bug than RFE.
Please remember about YAMAMOTO's comment "approve as far as documented loudly" :)

We also talked that we should thing about 2 additional things which are out of the scope of this RFE:
1. As yamamoto pointed out, we need to expose the capabilities of different backends.
2. We should be exposing some information about the current peering status

tags: added: rfe-approved
removed: rfe-triaged
Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-dynamic-routing (master)

Reviewed: https://review.openstack.org/608302
Committed: https://git.openstack.org/cgit/openstack/neutron-dynamic-routing/commit/?id=fc2dae7c93eb8606bcf0c77b6691595f69502c20
Submitter: Zuul
Branch: master

commit fc2dae7c93eb8606bcf0c77b6691595f69502c20
Author: Ryan Tidwell <email address hidden>
Date: Fri Oct 5 10:45:38 2018 -0500

    Enable MP-BGP capabilities in Ryu BGP driver

    This change enables all capabilties regardless of peer address
    family, thereby enabling announcement of IPv6 prefixes over IPv4
    sessions and vice-versa. Peers can opt in/out with capabilities
    configured on the remote end of the session.

    Change-Id: I7b241cdfddcecbdd8cdde2e88de35b9be6982451
    Closes-Bug: #1784590

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron-dynamic-routing 14.0.0.0b2

This issue was fixed in the openstack/neutron-dynamic-routing 14.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-dynamic-routing (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/686229

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-dynamic-routing (stable/rocky)

Reviewed: https://review.opendev.org/686229
Committed: https://git.openstack.org/cgit/openstack/neutron-dynamic-routing/commit/?id=bad20ef36b35dce0b1a0e79ae0d9f6b63f17389f
Submitter: Zuul
Branch: stable/rocky

commit bad20ef36b35dce0b1a0e79ae0d9f6b63f17389f
Author: Ryan Tidwell <email address hidden>
Date: Fri Oct 5 10:45:38 2018 -0500

    Enable MP-BGP capabilities in Ryu BGP driver

    This change enables all capabilties regardless of peer address
    family, thereby enabling announcement of IPv6 prefixes over IPv4
    sessions and vice-versa. Peers can opt in/out with capabilities
    configured on the remote end of the session.

    Change-Id: I7b241cdfddcecbdd8cdde2e88de35b9be6982451
    Closes-Bug: #1784590
    (cherry picked from commit fc2dae7c93eb8606bcf0c77b6691595f69502c20)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron-dynamic-routing 13.1.0

This issue was fixed in the openstack/neutron-dynamic-routing 13.1.0 release.

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

Other bug subscribers