Bug 2043234 - Missing validation when creating several BGPPeers with the same peerAddress
Summary: Missing validation when creating several BGPPeers with the same peerAddress
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.10
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.10.0
Assignee: Mohamed Mahmoud
QA Contact: Arti Sood
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-20 20:45 UTC by Jose Castillo Lema
Modified: 2022-03-10 16:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:41:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github metallb metallb-operator pull 147 0 None open Multiple peers in the same BGP instance with different remoteASN not supported in FRR mode 2022-01-20 21:26:42 UTC
Github openshift metallb-operator pull 57 0 None open Bug 2043234: In FRR mode its not possible to have duplicate BGPPeers 2022-01-27 12:14:41 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:41:37 UTC

Description Jose Castillo Lema 2022-01-20 20:45:25 UTC
Description of problem:
In FRR is not possible (as far as I know) to have the same neighbor defined twice (or more) with different ASN. As an example, if you try:
  neighbor 192.168.216.10 remote-as 65000
  neighbor 192.168.216.10 remote-as 65001
only one of the entries will get applied (and shown if running show running-config), not both.

So, MetalLB should not allow to create two BGPPeer objects with the same peerAddress.
In case this is a limitation specific to FRR (and not applicable to go-bgp), upon trying to create the secondary bgpPeer object the user should receive some kind of error like the following:
The BGPPeer "peer-65002" is invalid: spec.PeerAddress: Invalid value: 0xfdeb: Multiple equal peerAddress definitions not supported in FRR mode, ...

Version-Release number of selected component (if applicable):
Client Version: 4.10.0-0.nightly-2022-01-10-101431
Server Version: 4.10.0-0.nightly-2022-01-10-101431
metallb-operator.4.10.0-202201180823

How reproducible:
100%

Steps to Reproduce:
1. Create the first BGPPeer object:
    apiVersion: metallb.io/v1beta1
    kind: BGPPeer
    metadata:
      name: peer-65001
      namespace: metallb-system
    spec:
      peerAddress: 192.168.216.1
      peerASN: 65001
      myASN: 65000
2. Create the second BGPPeer object:
    apiVersion: metallb.io/v1beta1
    kind: BGPPeer
    metadata:
      name: peer-65002
      namespace: metallb-system
    spec:
      peerAddress: 192.168.216.1
      peerASN: 65002
      myASN: 65000

Actual results:
 - Both BGPPeers are created, however only one of them is correctly applied in the speaker configuration

Expected results:
 - The second BGPPeer creation should fail. In case this is a limitation specific to FRR (and not applicable to go-bgp) the user should receive some kind of error like the following:
The BGPPeer "peer-65002" is invalid: spec.PeerAddress: Invalid value: 0xfdeb: Multiple equal peerAddress definitions not supported in FRR mode, ...

Comment 5 errata-xmlrpc 2022-03-10 16:41:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:0056


Note You need to log in before you can comment on or make changes to this bug.