Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-48521

MetalLB: BGP neighbor fails to recognize the Graceful Restart configuration of the frrk8s pod

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.18
    • Networking / Metal LB
    • None
    • Important
    • None
    • Network Sprint 266
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

       
      The BGP neighbor does not recognize that the frrk8s pod has Graceful Restart configured.

      bgppeer:

      - apiVersion: metallb.io/v1beta2
        kind: BGPPeer
        metadata:
          creationTimestamp: "2025-01-16T20:05:47Z"
          generation: 2
          name: testpeer
          namespace: metallb-system
          resourceVersion: "1426948"
          uid: a13f345d-36a6-4f9d-a724-39b5554efd71
        spec:
          disableMP: false
          enableGracefulRestart: true
          myASN: 64500
          password: bgp-test
          passwordSecret: {}
          peerASN: 64500
          peerAddress: 10.46.186.88
          peerPort: 179
       

      frrk8s pod:

      worker-0# sh bgp nei graCodes: GR - Graceful Restart, * -  Inheriting Global GR Config,
             Restart - GR Mode-Restarting, Helper - GR Mode-Helper,
             Disable - GR Mode-Disable.Global BGP GR Mode :  HelperBGP neighbor is 10.46.186.88
          Local GR Mode: Restart    Remote GR Mode: Helper    R bit: True
          N bit: True
          Timers:
            Configured Restart Time(sec): 120
            Received Restart Time(sec): 120
          IPv4 Unicast:
            F bit: False
            End-of-RIB sent: Yes
            End-of-RIB sent after update: No
            End-of-RIB received: Yes
            Timers:
              Configured Stale Path Time(sec): 360
              Configured Selection Deferral Time(sec): 360
          IPv6 Unicast:
            F bit: False
            End-of-RIB sent: Yes
            End-of-RIB sent after update: Yes
            End-of-RIB received: Yes
            Timers:
              Configured Stale Path Time(sec): 360
              Configured Selection Deferral Time(sec): 360
       

      bgp neighbor (external frr pod):

      $ oc exec -it frr -n metallb-tests -c test --  vtysh -c "sh bgp neigh gra"Codes: GR - Graceful Restart, * -  Inheriting Global GR Config,
             Restart - GR Mode-Restarting, Helper - GR Mode-Helper,
             Disable - GR Mode-Disable.Global BGP GR Mode :  HelperBGP neighbor is 10.46.186.71
          Local GR Mode: Helper*    Remote GR Mode: Helper    R bit: True
          N bit: False
          Timers:
            Configured Restart Time(sec): 120
            Received Restart Time(sec): 120
          IPv4 Unicast:
            F bit: False
            End-of-RIB sent: Yes
            End-of-RIB sent after update: Yes
            End-of-RIB received: Yes
            Timers:
              Configured Stale Path Time(sec): 360
          IPv6 Unicast:
            F bit: False
            End-of-RIB sent: Yes
            End-of-RIB sent after update: Yes
            End-of-RIB received: Yes
            Timers:
              Configured Stale Path Time(sec): 360
      BGP neighbor is 10.46.186.72
          Local GR Mode: Helper*    Remote GR Mode: Helper    R bit: True
          N bit: False
          Timers:
            Configured Restart Time(sec): 120
            Received Restart Time(sec): 120
          IPv4 Unicast:
            F bit: False
            End-of-RIB sent: Yes
            End-of-RIB sent after update: Yes
            End-of-RIB received: Yes
            Timers:
              Configured Stale Path Time(sec): 360
          IPv6 Unicast:
            F bit: False
            End-of-RIB sent: Yes
            End-of-RIB sent after update: Yes
            End-of-RIB received: Yes
            Timers:
              Configured Stale Path Time(sec): 360
       

       
       

      Version-Release number of selected component (if applicable):
      Server Version: 4.18.0-rc.4
      metallb-operator.v4.18.0-202412180044

      How reproducible:
      20%

      Steps to Reproduce:
      1. Create BGP peer CR with GR configuraion
      2. Configure  bgp neighbor (external frr pod)
      3.
      Actual results:
      The routes will be removed if BGP session goes down

      $ oc exec -it frr -n metallb-tests --  vtysh -c "sh ip bgp"
      Defaulted container "test" out of: test, frr2
      BGP table version is 5, local router ID is 10.10.10.11, vrf id 0
      Default local pref 100, local AS 64500
      Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
                     i internal, r RIB-failure, S Stale, R Removed
      Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
      Origin codes:  i - IGP, e - EGP, ? - incomplete
      RPKI validation codes: V valid, I invalid, N Not found    Network          Next Hop            Metric LocPrf Weight Path
       *>i4.4.4.1/32       10.46.186.71             0    100      0 i
       *=i                 10.46.186.72             0    100      0 iDisplayed  1 routes and 2 total paths
      
      
      $ oc exec -it frr -n metallb-tests --  vtysh -c "sh ip bgp"
      Defaulted container "test" out of: test, frr2
      No BGP prefixes displayed, 0 exist
       
      $ oc exec -it frr -n metallb-tests -c test --  vtysh -c "sh bgp neigh gra"Codes: GR - Graceful Restart, * -  Inheriting Global GR Config,
             Restart - GR Mode-Restarting, Helper - GR Mode-Helper,
             Disable - GR Mode-Disable.Global BGP GR Mode :  HelperBGP neighbor is 10.46.186.71
          Local GR Mode: Helper*    Remote GR Mode: NotApplicable    R bit: False
          N bit: False
          Timers:
            Configured Restart Time(sec): 120
            Received Restart Time(sec): 120
      BGP neighbor is 10.46.186.72
          Local GR Mode: Helper*    Remote GR Mode: NotApplicable    R bit: False
          N bit: False
          Timers:
            Configured Restart Time(sec): 120
            Received Restart Time(sec): 120
      Codes: GR - Graceful Restart, * -  Inheriting Global GR Config,
             Restart - GR Mode-Restarting, Helper - GR Mode-Helper,
             Disable - GR Mode-Disable.Global BGP GR Mode :  Helper
       

      Expected results:
      BGP routes should remain in the BGP table for the GR timeout period after the BGP session is lost.

      Codes: GR - Graceful Restart, * -  Inheriting Global GR Config,
             Restart - GR Mode-Restarting, Helper - GR Mode-Helper,
             Disable - GR Mode-Disable.Global BGP GR Mode :  HelperBGP neighbor is 10.46.186.71
          Local GR Mode: Helper*    Remote GR Mode: NotApplicable    R bit: False
          N bit: False
          Timers:
            Configured Restart Time(sec): 120
            Received Restart Time(sec): 120
            Restart Time Remaining(sec): 113
            Restart Time Remaining(sec): 113
      BGP neighbor is 10.46.186.72
          Local GR Mode: Helper*    Remote GR Mode: NotApplicable    R bit: False
          N bit: False
          Timers:
            Configured Restart Time(sec): 120
            Received Restart Time(sec): 120
            Restart Time Remaining(sec): 115
            Restart Time Remaining(sec): 115
      Codes: GR - Graceful Restart, * -  Inheriting Global GR Config,
             Restart - GR Mode-Restarting, Helper - GR Mode-Helper,
             Disable - GR Mode-Disable.Global BGP GR Mode :  Helper
       

      Additional info:

              kkarampo@redhat.com Konstantinos Karampogias
              rhn-cnf-elevin Evgeny Levin
              Evgeny Levin Evgeny Levin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: