Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpd: BGP dampening JSON fixes (backport #9062) #9151

Merged
merged 2 commits into from
Jul 23, 2021

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jul 23, 2021

This is an automatic backport of pull request #9062 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

ton31337 added 2 commits July 23, 2021 09:20
```
5  0x00007fccab6fac39 in json_object_boolean_true_add (obj=<optimized out>, key=<optimized out>) at lib/json.c:70
No locals.
6  0x000055c7b8c08ae5 in route_vty_short_status_out (vty=<optimized out>, path=0x55c7bb37dcf0, p=<optimized out>, json_path=0x55c7bb3735a0)
    at bgpd/bgp_route.c:8566
        rpki_state = RPKI_NOT_BEING_USED
7  0x000055c7b8c22d1b in flap_route_vty_out (afi=AFI_IP, json=0x55c7bb3735a0, use_json=true, safi=SAFI_UNICAST, display=0, path=0x55c7bb37dcf0,
    p=0x55c7bb37dea0, vty=0x55c7bb39e4c0) at bgpd/bgp_route.c:9600
        attr = <optimized out>
        bdi = 0x55c7bb377950
        timebuf = '\000' <repeats 24 times>
        len = <optimized out>
8  bgp_show_table (vty=0x55c7bb39e4c0, bgp=0x55c7bb316300, safi=safi@entry=SAFI_UNICAST, table=0x55c7bb314d90, type=bgp_show_type_flap_statistics,
    output_arg=0x0, rd=0x0, is_last=1, output_cum=0x0, total_cum=0x0, json_header_depth=0x7ffeefd649f8, show_flags=1, rpki_target_state=RPKI_NOT_BEING_USED)
    at bgpd/bgp_route.c:11110
```

With fix:

```
exit1-debian-9# sh ip bgp dampening dampened-paths
BGP table version is 16, local router ID is 10.10.10.200, vrf id 0
Default local pref 100, local AS 65001
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          From             Reuse    Path
*d 10.0.0.0/24      192.168.0.2      00:21:08 65000 ?
*d 10.10.10.100/32  192.168.0.2      00:21:08 65000 ?
*d 192.168.1.0/24   192.168.0.2      00:21:08 65000 ?

Displayed  3 routes and 10 total paths
exit1-debian-9# sh ip bgp dampening dampened-paths json
{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 16,
 "routerId": "10.10.10.200",
 "defaultLocPrf": 100,
 "localAS": 65001,
 "routes": { "10.0.0.0/24": [
  {
    "valid":true,
    "damped":true,
    "pathFrom":"external",
    "reuseTimerMsecs":1263000,
    "asPath":"65000",
    "origin":"?",
    "peerHost":"192.168.0.2"
  }
],"10.10.10.100/32": [
  {
    "valid":true,
    "damped":true,
    "pathFrom":"external",
    "reuseTimerMsecs":1263000,
    "asPath":"65000",
    "origin":"?",
    "peerHost":"192.168.0.2"
  }
],"192.168.1.0/24": [
  {
    "valid":true,
    "damped":true,
    "pathFrom":"external",
    "reuseTimerMsecs":1263000,
    "asPath":"65000",
    "origin":"?",
    "peerHost":"192.168.0.2"
  }
] }  }
```

Signed-off-by: Donatas Abraitis <[email protected]>
(cherry picked from commit e5be8c1)
With fix:
```
exit1-debian-9# sh ip bgp dampening flap-statistics
BGP table version is 22, local router ID is 10.10.10.200, vrf id 0
Default local pref 100, local AS 65001
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          From            Flaps Duration Reuse    Path
*d 10.0.0.0/24      192.168.0.2     4    00:00:50 00:35:56 65000 ?
*d 10.10.10.100/32  192.168.0.2     4    00:00:50 00:35:56 65000 ?
*d 192.168.1.0/24   192.168.0.2     4    00:00:50 00:35:56 65000 ?

Displayed  3 routes and 10 total paths
exit1-debian-9# sh ip bgp dampening flap-statistics json
{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 22,
 "routerId": "10.10.10.200",
 "defaultLocPrf": 100,
 "localAS": 65001,
 "routes": { "10.0.0.0/24": [
  {
    "valid":true,
    "damped":true,
    "pathFrom":"external",
    "peerHost":"192.168.0.2",
    "bdiFlap":4,
    "peerUptime":"00:00:54",
    "peerUptimeMsec":54000,
    "peerUptimeEstablishedEpoch":1626355135,
    "reuseTimerMsecs":2151000,
    "asPath":"65000",
    "origin":"?"
  }
],"10.10.10.100/32": [
  {
    "valid":true,
    "damped":true,
    "pathFrom":"external",
    "peerHost":"192.168.0.2",
    "bdiFlap":4,
    "peerUptime":"00:00:54",
    "peerUptimeMsec":54000,
    "peerUptimeEstablishedEpoch":1626355135,
    "reuseTimerMsecs":2151000,
    "asPath":"65000",
    "origin":"?"
  }
],"192.168.1.0/24": [
  {
    "valid":true,
    "damped":true,
    "pathFrom":"external",
    "peerHost":"192.168.0.2",
    "bdiFlap":4,
    "peerUptime":"00:00:54",
    "peerUptimeMsec":54000,
    "peerUptimeEstablishedEpoch":1626355135,
    "reuseTimerMsecs":2151000,
    "asPath":"65000",
    "origin":"?"
  }
] }  }
```

Signed-off-by: Donatas Abraitis <[email protected]>
(cherry picked from commit 3125804)
@polychaeta polychaeta added the bgp label Jul 23, 2021
@donaldsharp donaldsharp merged commit 5e2c850 into stable/8.0 Jul 23, 2021
@mergify mergify bot deleted the mergify/bp/stable/8.0/pr-9062 branch July 23, 2021 12:34
@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20467/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants