Merge pull request #19183 from donaldsharp/mgmt_support_bundle_dataAdd ability to see locks in mgmt’s data store, ensure in topotests that daemons are connected to mgmtd
tests: Ensure daemons are connected to mgmtd before proceedingWe have several tests that are proceeding before mgmtd has been
fully connected to. Just like we ensure that zebra is connected
to we need to do the same thing for the daemons that connect
to mgmtd.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
mgmt: Note that a DS is locked or not in outputModify the `show mgmt datastore ..` command to note
if the data store is locked and by which session-id.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: ospf6_gr_topo1 needs a slightly longer timerWhen converging, 15 seconds is not quite enough under heavy system load.
Giving it 20 seconds seems to do the trick nicely.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: Use correct pytest mark for ospf6 tests.A bunch of the ospf6d tests are marked as ospfd tests
instead. Let's mark them correctly.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ospf6d, tests: Fix `show ipv6 ospf6 route json`The `show ipv6 ospf6 route json` command does not
show the full output of available routes as that
it will overwrite a prefix if you happen to have
more than one. Modify the code such that
we create an array and put the individual routes
into the array. Also modify the tests to accept
arrays for the command.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Merge pull request #19165 from opensourcerouting/fix/weighted_ecmp_link_bandwidth_between_vrfsbgpd: Extract link bandwidth value from extcommunity before using for WCMP
bgpd: Extract link bandwidth value from extcommunity before using for WCMPExtended communities are exported/imported correctly between VRFs, but we need
to extract the actual link-bandwidth value from the extended communities.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
tests: Increase timeout for any test that uses the retry mechanism.Test is showing this on failure in the logs for the static_vrf test
locally:
2025-07-09 11:28:15,614 INFO: topo: Function raised exception: "AssertionError("Failed to find \n '192.0.2.130'\n in \n '198.51.100.1 nhid 25 via 192.0.2.2 dev r1-eth0 proto 196 metric 20 \n '\nassert '192.0.2.130' in '198.51.100.1 nhid 25 via 192.0.2.2 dev r1-eth0 proto 196 metric 20 \\n'")"
2025-07-09 11:28:15...
bgpd: fix memory leak with srv6 locatorWhen SRv6 locator is modified for configuration, a memory leak is
observed.
> ==26714==ERROR: LeakSanitizer: detected memory leaks
>
> Direct leak of 1104 byte(s) in 3 object(s) allocated from:
> #0 0x7fb232cb83b7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
> #1 0x7fb232822b79 in qcalloc lib/memory.c:111
> #2 0x7fb23283a8b6 in srv6_locator_all...
bgpd: add trace to dump SID allocator request and its locatorAdd a new trace before sending a message to ZEBRA, to request for a SID.
> 2025/06/25 15:46:12 BGP: [PK8ZC-3S45T] ensure_vrf_tovpn_sid_per_af: allocating new SID for vrf VRF vrf20: afi IPv6, locator loc1
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
topotests: bgp_srv6l3vpn_sid, add test to control sid allocation per vrfAdd test to control SID allocation per vrf. Test the case with a locator
in each of the two BGP instances. Test also the case with no locator in
the default BGP instance.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd: fix release SID upon SID notification mismatchWhen a SID is allocated, and BGP configuration has changed, a mismatch
is identified, but the SID is still considered as valid from zebra
perspective. Fix this by releasing the SID upon error.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
zebra: Ensure on exit that log buffers are flushedI'm seeing cases of tests failing in the CI system
where zebra just is not running and there are no
dumps of the backtrace. In the past it's not
uncommon for exit to be called when zebra just
dissapears. Let's see if we get a bit more data
in this case when it happens if we initiate a buffer
flush.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd: enforce control on srv6 locator on sid notificationWhen a SID is allocated, no check is done about the locator which has
granted the SID. Retrieve the locator name from the zapi message, and
compare the locator_name against the configured locator name.
Display a message in case locator mismatch appears. Update current
message:
> 2025/06/25 14:36:46 BGP: [MZG7B-9WJC2] bgp_zebra_srv6_sid_notify: received SRv6 SID notify: ctx End.DT4 vrf_id 6 (vr...
bgpd: add bgp_srv6_locator_lookup() APIAdd an API to return the locator structure that should have been
resolved by zebta. Return NULL if no resolution has been done.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd: remove srv6_enabled from bgpd instanceThe srv6_enabled attribute is useless, and reflects the configuration of
a locator. Simplify the algorithm by not using that attribute.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd: fix free SID once sid_unregister calledThe sid_unregister() function accesses the SID value, whereas that SID
value has been freed just before. Swap the order of execution of the two
lines.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd: update hencaps when removing bgp srv6 configurationWhen the bgp srv6 configuration is disabled, the header encaps
configuration should be set to its default value too.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
tests: Fix bgp_bmp testsThe bgp_bmp tests have a global SEQ number that was being shared
across all tests running at the same time. As such if one of the
3 tests was running at the same time as the other 2, you could end
up in a situation where the SEQ number from one test would affect
a different test, thus causing it to get out of sync and fail the test.
I saw this when I added log output to display the starting s...
bgpd: fix "neighbor <n> local-as (null)" in running-configIssue:
The vtysh running-config will incorrectly show
bgp neighbor local-as value as (null) with this config sequence -
1.configure bgp peer-group p1 with local-as as1
2.configure bgp neighbor n1, assign peer-group pg1 to it.
3.set local-as of neighbor n1 to as1
RC:
peer->change_local_as_pretty(having string value of local-as) is not set for bgp neighbor,
when new configured local-as value ...