]> git.proxmox.com Git - mirror_frr.git/commit - tests/topotests/all_protocol_startup/test_all_protocol_startup.py
tests: Fix route replace test in all_protocol_startup
authorDonald Sharp <sharpd@nvidia.com>
Thu, 4 Nov 2021 15:45:27 +0000 (11:45 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 4 Nov 2021 15:49:04 +0000 (11:49 -0400)
commit8beb469fd3bef6d4158392795d0d5ae8214e7a82
treed1a8c412b21f9a0873f606a863a1bfb9026c58e5
parentf154a68dbe0f489b72ce744ff48001e136c808bc
tests: Fix route replace test in all_protocol_startup

The route replace test was doing this seq of events:

a) Create nhg
b) Install route w/ sharpd
c) Ensure it worked
d) Modify nhg
d) Ensure the update group replace worked

The problem is that the sharp code is doing this:

/* Only send via ID if nhgroup has been successfully installed */
if (nhgid && sharp_nhgroup_id_is_installed(nhgid)) {
SET_FLAG(api.message, ZAPI_MESSAGE_NHG);
api.nhgid = nhgid;
} else {
for (ALL_NEXTHOPS_PTR(nhg, nh)) {
api_nh = &api.nexthops[i];

zapi_nexthop_from_nexthop(api_nh, nh);

i++;
}
api.nexthop_num = i;
}

The created nhg has not been successfully installed( or at least
sharpd has not read the results yet) when it gets the command
to install the routes.  As such it passes down the individual
nexthops instead.  The route replace is never going to work.

Modify the code to add a bit of sleep to allow sharpd to
get notified when the system is under load.  At this point
there is no way to query sharpd for whether or not it
thinks it's nhg is installed properly or not.  This
test is failing all over the place for a bunch of people
let's get this fixed so people can get running

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests/topotests/all_protocol_startup/test_all_protocol_startup.py