FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.35k stars 1.26k forks source link

ospfv3 summarisation display with json prints duplicate entries. #10835

Closed gpnaveen closed 2 years ago

gpnaveen commented 2 years ago

Version::

r0# show ver FRRouting 8.3-dev (r0) on Linux(4.19.127-nn4-server). Copyright 1996-2005 Kunihiro Ishiguro, et al. configured with: '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--disable-maintainer-mode' '--localstatedir=/var/run/frr' '--sbindir=/usr/lib/frr' '--sysconfdir=/etc/frr' '--with-vtysh-pager=/usr/bin/pager' '--libdir=/usr/lib/x86_64-linux-gnu/frr' '--with-moduledir=/usr/lib/x86_64-linux-gnu/frr/modules' '--disable-dependency-tracking' '--enable-rpki' '--disable-scripting' '--with-libpam' '--enable-doc' '--enable-doc-html' '--enable-snmp' '--enable-fpm' '--disable-protobuf' '--disable-zeromq' '--enable-ospfapi' '--enable-bgp-vnc' '--enable-multipath=256' '--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty' '--enable-configfile-mask=0640' '--enable-logfile-mask=0640' '--enable-sharpd' 'build_alias=x86_64-linux-gnu' 'PYTHON=python3' r0#

Build : https://ci1.netdef.org/browse/FRR-PULLREQ2-4217/artifact/shared/Ubuntu-18.04-x86_64-Packages/

From pr: https://ci1.netdef.org/browse/FRR-PULLREQ2-4217

Initial analysis: Duplicate entries present in ospf6_top.c (json_vrf, "aggregation delay interval", ospf6->aggr_delay_interval); json_object_int_add(json_vrf, "aggregationDelayInterval", ospf6->aggr_delay_interval);

Impact: Json key search can fail ci automation.

Sample output: r0# show ipv6 ospf su json { "default":{ "vrfName":"default", "vrfId":0, "aggregation delay interval":6, "aggregationDelayInterval":6, "2011::\/32":{ "Summary address":"2011::\/32", "summaryAddress":"2011::\/32", "Metric-type":"E2", "metricType":"E2", "Metric":20, "Tag":0, "External route count":5, "externalRouteCount":5 } } }

Running config: hostname r0 log file /tmp/topotests/ospfv3_basic_functionality.test_ospfv3_asbr_summary_topo1/r0/zebra.log log commands log file /tmp/topotests/ospfv3_basic_functionality.test_ospfv3_asbr_summary_topo1/r0/ospf6d.log log file /tmp/topotests/ospfv3_basic_functionality.test_ospfv3_asbr_summary_topo1/r0/bgpd.log log file /tmp/topotests/ospfv3_basic_functionality.test_ospfv3_asbr_summary_topo1/r0/staticd.log no service integrated-vtysh-config ! ipv6 route 2011:0:20::1/128 blackhole ipv6 route 2011:0:20::2/128 blackhole ipv6 route 2011:0:20::3/128 blackhole ipv6 route 2011:0:20::4/128 blackhole ipv6 route 2011:0:20::5/128 blackhole ipv6 route 2012:0:20::1/128 blackhole ipv6 route 2012:0:20::2/128 blackhole ipv6 route 2012:0:20::3/128 blackhole ipv6 route 2012:0:20::4/128 blackhole ipv6 route 2012:0:20::5/128 blackhole ! interface lo ipv6 address 2001:db8:f::1:17/128 exit ! interface r0-r1-eth0 ipv6 address fd00::1/64 ipv6 ospf6 area 0.0.0.0 ipv6 ospf6 dead-interval 4 ipv6 ospf6 hello-interval 1 exit ! interface r0-r2-eth1 ipv6 address fd00:0:0:1::1/64 ipv6 ospf6 area 0.0.0.0 ipv6 ospf6 dead-interval 4 ipv6 ospf6 hello-interval 1 exit ! interface r0-r3-eth2 ipv6 address fd00:0:0:2::1/64 ipv6 ospf6 area 0.0.0.0 ipv6 ospf6 dead-interval 4 ipv6 ospf6 hello-interval 1 ipv6 ospf6 network point-to-point exit ! interface r0-r3-eth3 ipv6 address fd00:0:0:3::1/64 exit ! router ospf6 ospf6 router-id 100.1.1.0 redistribute static aggregation timer 6 summary-address 2011::/32 exit ! end

ton31337 commented 2 years ago

This is intentional, because of https://github.com/FRRouting/frr/pull/10447/commits/08d79bce3df0028f3db56010a49b57ca908c1f25. Wrong JSON keys gonna be dropped after the deprecation cycle ends.