diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-09-16 23:50:12 +0200 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-09-16 23:50:12 +0200 |
| commit | f6102c545e8587acb747af3dca5633143a59c781 (patch) | |
| tree | 59f4bf84f0b423b9d636e98f0cd37ef9ae1d1fa6 /src/migration-scripts/interface | |
| parent | 7943d798dcb4c860610d3e1b2869175a9147c083 (diff) | |
| download | vyos-1x-f6102c545e8587acb747af3dca5633143a59c781.tar.gz vyos-1x-f6102c545e8587acb747af3dca5633143a59c781.zip | |
smoketest: T9316: do not race the DHCP client when checking VRF membership
test_dhcp_vrf and test_dhcpv6_vrf resolved the DHCP client's PID, then read
the VRF's process list and asserted the PID appeared in it. The client
re-executes itself at moments of its own choosing, so between those two
steps it can come back with a new PID - the process is in the VRF, it simply
is not the process we asked about:
AssertionError: '13502' not found in '14322 dhclient\n
14324 dhclient-script\n
14485 dhclient...'
Observed failing and passing on the same image, so it costs a rerun rather
than telling anyone anything.
get_process_cmdline() already fights the same race for the /proc read.
Resolve the PID and read the VRF's list as one step and retry, so a restart
costs a retry instead of a failure.
The probe itself was also loose: substring-matching the raw output of
"ip vrf pids <name>" lets a PID check be satisfied by the process name
column or by a longer PID containing ours. Add
vyos.utils.network.get_vrf_pids(), which parses the command's
"<pid> <name>" lines into (pid, process_name) tuples and returns an empty
list for an unknown VRF, and compare the PID field as an int.
Diffstat (limited to 'src/migration-scripts/interface')
0 files changed, 0 insertions, 0 deletions
