Skip to content

Conversation

cscarpitta
Copy link
Contributor

The srv6_encap_src_addr runs a vtysh command to configure the SRv6 encapsulation source address and then immediately invokes an iproute2 command to verify that zebra has set this address in the kernel. There is no wait between the two operations and the verification is attempted only once. If the topotest does not find the expected address it fails immediately.

The problem is that when topotest is run on a heavyily loaded system, it can take some time for zebra to set the address in the kernel.
In this case, when the topotest checks the kernel address right after running the vtysh command, it doesn't find the expected address because zebra hasn't set it yet.

This commit gives zebra some time to configure the address. It keeps to check that the address is the expected one for about 1 minute. If after 1 minute the address is not the expected one then the test fails.

The `srv6_encap_src_addr` does not use bgp. As such, it should not have
bgpd marker.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
The `srv6_encap_src_addr` topotest tries to load sharpd.conf file that
does not exist, which produces the following warning:

```
2025-02-16 09:23:35,151 WARNING: topo: missing config 'r1' for '/media/frr/tests/topotests/srv6_encap_src_addr/r1/sharpd.conf' creating empty file '/etc/frr/sharpd.conf'
```

Since this topotest doesn't actually use sharpd, there's no point in
loading the config file.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
The `srv6_encap_src_addr` topotest tries to load bgpd.conf file that
does not exist, which produces the following warning:

```
2025-02-16 09:23:35,151 WARNING: topo: missing config 'r1' for '/media/frr/tests/topotests/srv6_encap_src_addr/r1/bgpd.conf' creating empty file '/etc/frr/bgpd.conf'
```

Since this topotest doesn't actually use bgpd, there's no point in
loading the config file.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
The `srv6_encap_src_addr` topotest uses a waiting time that is too
small. For this reason during startup it prints a warning:

```
2025-02-16 09:23:47,704 WARNING: topo: Waiting time is too small (count=10, wait=1), using default values (count=20, wait=3)
```

This commit increases the waiting time to fix the warning.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
@frrbot frrbot bot added the tests Topotests, make check, etc label Feb 16, 2025
@cscarpitta cscarpitta changed the title tests: Increase retry timeout in srv6_encap_src_addr topotest tests: Increase retry timeout in srv6_encap_src_addr topotest Feb 16, 2025
@cscarpitta cscarpitta changed the title tests: Increase retry timeout in srv6_encap_src_addr topotest tests: Increase retry timeout in srv6_encap_src_addr topotest Feb 16, 2025
@cscarpitta cscarpitta changed the title tests: Increase retry timeout in srv6_encap_src_addr topotest tests: Fix intermittent failures in srv6_encap_src_addr topotest Feb 16, 2025
@cscarpitta cscarpitta changed the title tests: Fix intermittent failures in srv6_encap_src_addr topotest tests: Fix intermittent failures in srv6_encap_src_addr topotest Feb 16, 2025
The `srv6_encap_src_addr` runs a vtysh command to configure the SRv6
encapsulation source address and then immediately invokes an iproute2
command to verify that zebra has set this address in the kernel. There
is no wait between the two operations and the verification is attempted
only once. If the topotest does not find the expected address it fails
immediately.

The problem is that when topotest is run on a heavyily loaded system,
it can take some time for zebra to set the address in the kernel.
In this case, when the topotest checks the kernel address right after
running the vtysh command, it doesn't find the expected address because
zebra hasn't set it yet.

This commit gives zebra some time to configure the address. It keeps to
check that the address is the expected one for about 1 minute. If after
1 minute the address is not the expected one then the test fails.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
@cscarpitta cscarpitta force-pushed the fix/fix_srv6_encap_src_addr_test_failures branch from 21fedd9 to c621b5e Compare February 16, 2025 10:15
@donaldsharp donaldsharp merged commit 197d12f into FRRouting:master Feb 16, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master size/M tests Topotests, make check, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants