]> git.puffer.fish Git - mirror/frr.git/commit
test: Fix addKernelRoute looking for positive results 10143/head
authorDonald Sharp <sharpd@nvidia.com>
Mon, 29 Nov 2021 13:37:21 +0000 (08:37 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 29 Nov 2021 13:42:03 +0000 (08:42 -0500)
commit93d664c26a4657f69d6e6f94f67254312af1fff5
treec6bd923d619af95740f7429d9fc8010bea3895c5
parent5fee827d322ae2e4183df5d31b9629e41d39cbc6
test: Fix addKernelRoute looking for positive results

Under heavy system load, we are sometimes seeing this
output for addKernelRoute:

2021-11-28 16:17:27,604 INFO: topolog: [DUT: b1]: Running command: [ip route add 224.0.0.13 dev b1-f1-eth0]
2021-11-28 16:17:27,604 DEBUG: topolog.b1: LinuxNamespace(b1): cmd_status("['/bin/bash', '-c', 'ip route add 224.0.0.13 dev b1-f1-eth0']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2021-11-28 16:17:27,967 DEBUG: topolog.b1: LinuxNamespace(b1): cmd_status("['/bin/bash', '-c', 'ip route']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2021-11-28 16:17:28,243 DEBUG: topolog: ip route
70.0.0.0/24 dev b1-f1-eth0 proto kernel scope link src 70.0.0.1
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This tells us that the ip route add succeeded but when looking for it
the system failed to immediately find it.  Why is this happening?
Probably we are under heavy system load and the two different
commands, 'ip route add..' and 'ip route show' are being executed
on different cpu's and the data has not been copied to the different
cpu yet in the kernel.  This is not necessarily something normally
seen but entirely possible.  Giving the system a few extra seconds
for the kernel to execute/work the memory barrier system seems
prudent for long term success of our programming.

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