Skip to content

Commit

Permalink
Debian 12 uses systemd-networkd instead of dhclient.
Browse files Browse the repository at this point in the history
Means the log format has changed and we do no longer get any match for "DHCPACK".
The log entry we are looking for in Debian 12 contains a "DHCPv4" prefix.
  • Loading branch information
Kenneth Joss committed Aug 26, 2024
1 parent 68a430a commit 60ab053
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test_public_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_public_network_connectivity_on_all_images(server):
server.ping(address, count=3, interval=0.5)


def test_public_network_mtu(server):
def test_public_network_mtu(server, image):
""" Verify that the public interface MTU is exactly 1500 bytes and that
MTU-sized packages can be exchanged and not exceeded.
Expand All @@ -82,8 +82,14 @@ def test_public_network_mtu(server):
assert int(mtu) == 1500

# Get the address of the DHCP server in use
#
# Debian 12 uses systemd-networkd. Therefor, the log entries
# look way different than, for example Debian 10, with dhclient.
# Debian 12: DHCPv4, Debian 10: DHCPACK
ping_target = server.output_of(
"sudo journalctl | grep DHCPACK | tail -n 1 | awk '{print $NF}'")
"sudo journalctl | egrep 'DHCPv4|DHCPACK' | tail -n 1 | "
"awk '{{print $NF}}'"
)

# Try to send a packet using exactly 1500 bytes, which should work. We use
# a size of 1472, as 8 bytes are used for the ICMP header and another
Expand Down

0 comments on commit 60ab053

Please sign in to comment.