[Bug 1969901] Re: network-manager fails to renew ipv6 address

Håkan Kvist 1969901 at bugs.launchpad.net
Thu Jun 23 13:54:18 UTC 2022


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
* 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

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

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1969901

Title:
  network-manager fails to renew ipv6 address

Status in network-manager package in Ubuntu:
  Fix Released
Status in network-manager source package in Bionic:
  Incomplete

Bug description:
  [Impact]

   * This affects Ubuntu 18.04 where Network Manager version 1.10.6 is
  used.

   * Network manager might kill dhclient(6) and fail to start it again
     causing the IPv6 address to be lost on a network that uses mixed
     IPv4/IPV6.
     The network status will still be seen as online in gnome since ipv4
     is still active.
     The user then have to manually remove the dhcpv6 lease files and
     restart ipv6 connection/restart network manager to regain IPv6
     connectivity.

   * This is a cherry-pick from Network manager 1.10.8 (Ubuntu's version
     is based on 1.10.6):
     https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/7fbbe7ebee99785e38d39c37e515a64a28edef0f

   * Upstream bug:
     https://bugzilla.gnome.org/show_bug.cgi?id=783391

  [Test Plan]

   * The exact conditions for reproducing this bug on mixed IPv4/IPv6
     networks are not known but includes using both IPv4 and IPv6,
     both using dhcp.

  [Where problems could occur]

   * The change is in the dchp lease expiration handling so verify that
  there is no regression in dhcp renewals on different type of
  configuration include IPv6

  [Other Info]
   * We have tested this patch on a couple of clients where we have seen this
     this problem. If this patch is feasible to include in Ubuntu 18.04 we
     could request more users to test.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1969901/+subscriptions




More information about the Ubuntu-sponsors mailing list