Code review comment for ~alfonsosanchezbeato/snappy-hwe-snaps/+git/network-manager:fix-route-end-dhcp-lease

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Actually, both changes (the MP in the bug and this one) solve the issue, the first one by making sure the IP does not survive after networkd does not manage the interface anymore, this one by making sure NM handles well that situation. This MP is for more general cases, so it is good that we land it, it is a bug fix anyway.

The fixes come from branch 1.2 of NM upstream.

The scenario is basically as you describe. Bottom line is that NM finds an IP already existing in the interface, but when it uses DHCP (which it does always when starting) the lease gives a different IP. In that situation, some times the default route is not restored. This is a race which happens maybe 50% of the times. This is what this MP fixes.

We do ship a netplan file that sets NM as the rendered, but on *first boot* networkd takes eth0 until a systemd service that sets the new netplan file does the change of netplan files.

« Back to merge proposal