Comment 10 for bug 1969901

Revision history for this message
HÃ¥kan Kvist (hakankvist) wrote (last edit ):

Proposal for test plan, we have tested this for 5 iterations, and looking good so far.

The test requires three computers
* one computer runing isc dhcpd server (with network configured static)
* one computer running patched network manager
* one computer running vanilla ubuntu

The idea is to execute on an isolated network and trigger the error by changing
ip range handed out by the dhcp-server to force a nack response back to the
clients.

Expected result
* patched network keeps dhclient6 alive
* vanilla network manager will fail to keep dhclient6 alive
  in network manager logs dhcp6 will expire and not be restarted

ON THE SERVER
# Disable app-armor, as it has rules restricting dhcpd
aa-teardown

# install isc dhcpserver
isc-dhcp-server

# configure network static
sudo nmcli connection modify "${CONNECTION_NAME}" \
     ipv4.method "manual" \
     ipv4.addresses "192.168.1.1/24" \
     ipv4.gateway "192.168.1.254" \
     ipv4.dns "192.168.1.1" \
     ipv6.method "manual" \
     ipv6.addresses "2001:db8:0:1::1/64" \
     ipv6.gateway "2001:db8:0:1::ffbb" \
     ipv6.dns "2001:db8:0:1::1/64"

mkdir -p tmp
touch tmp/dhcpd4_a.leases
touch tmp/dhcpd4_b.leases
touch tmp/dhcpd6_a.leases
touch tmp/dhcpd6_b.leases

Then it is time to execute dhcpd
-f - run in foreground
-d - print errors to stderr instead of syslog

# Start in separate terminals
dhcpd -f -d -4 -cf dhcp_v4_a.conf -lf tmp/dhcpd4_a.leases enp0s31f6
dhcpd -f -d -6 -cf dhcp_v6_a.conf -lf tmp/dhcpd6_a.leases enp0s31f6

Press ctrl-C to kill servers, then restart with the b configurations

dhcpd -f -d -4 -cf dhcp_v4_b.conf -lf tmp/dhcpd4_b.leases enp0s31f6
dhcpd -f -d -6 -cf dhcp_v6_b.conf -lf tmp/dhcpd6_b.leases enp0s31f6

Then leases to expire (check for clients that kills dhclient)
Press ctrl-C to kill servers, then restart with the a configurations

ON THE CLIENTS
Setup:
Configure ipv6 network in settings to use dhcp (using the gui)

Test:
check that dhcp clients are still running:
ps aux|grep dhclient

Expected in output
one client for dhcpv4
one client for dhcpv6

Also check network manager status :
journalctl -u NetworkManager.service
journalctl -u NetworkManager.service|grep dhcp6 # to only view dhclient6
journalctl -u NetworkManager.service|grep dhcp4 # to only view dhclient4

if dhclient is not running:
stop network in gui
remove lease files (/var/lib/NetworkManager/dhclient*.lease). Only remove the lease for the client not running.
start network in gui

if dhclients are running:
wait additional ten minutes, repeat from beginning of test