Skip to content

Commit

Permalink
system-tests: Reduce flakiness of IPv6 prefix delegation
Browse files Browse the repository at this point in the history
If one of the permutations failed, others running after
that would also fail because of leftover dhcpd running.
Make sure that dhcpd is killed if it's still running
since previous test.

Reported-at: https://bugzilla.redhat.com/2108726
Signed-off-by: Ales Musil <amusil@redhat.com>
Acked-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
(cherry picked from commit b340d5d)
  • Loading branch information
almusil authored and numansiddique committed Aug 2, 2022
1 parent ec93353 commit dd0bdf5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/system-ovn.at
Expand Up @@ -5265,6 +5265,10 @@ ovn-nbctl set logical_router_port rp-public options:prefix=true
ovn-nbctl set logical_router_port rp-sw0 options:prefix=true
ovn-nbctl set logical_router_port rp-sw1 options:prefix=true

OVN_POPULATE_ARP

ovn-nbctl --wait=hv sync

cat > /etc/dhcp/dhcpd.conf <<EOF
option dhcp-rebinding-time 15;
option dhcp-renewal-time 10;
Expand All @@ -5279,7 +5283,7 @@ chown root:dhcpd /var/lib/dhcp /var/lib/dhcp/dhcpd6.leases
chmod 775 /var/lib/dhcp
chmod 664 /var/lib/dhcp/dhcpd6.leases

NS_CHECK_EXEC([server], [dhcpd -6 -f s1 > dhcpd.log &])
NETNS_DAEMONIZE([server], [dhcpd -6 -f s1 > dhcpd.log 2>&1], [dhcpd.pid])
ovn-nbctl --wait=hv sync

OVS_WAIT_WHILE([test "$(ovn-nbctl get logical_router_port rp-public ipv6_prefix | cut -c4-15)" = ""])
Expand Down Expand Up @@ -5315,7 +5319,6 @@ OVS_WAIT_UNTIL([
test "${total_pkts}" = "1"
])

kill $(pidof dhcpd)
kill $(pidof tcpdump)

ovn-nbctl set logical_router_port rp-sw0 options:prefix=false
Expand Down

0 comments on commit dd0bdf5

Please sign in to comment.