Device install with network-manager - name resolution failure until reboot

Hi,

I’ve been evaluation network-manager for some UC use cases. IT works pretty well on the whole, and obviously brings some more advanced features of systemd-networkd.

However, I noticed that including networking-manager in the model assertion and image, then bootstrapping the device, name resolution fails until the device is rebooted.

It seems both the dns server I and search path are missing from the system resolver config. There is nothing obvious in either systemd-networkd logs, or network-manager logs.

A reboot fixes the issue.

It looks like after initial bootstrap and first reboot, systemd-networkd is still in use, and network-manager doesn’t take over until the next reboot. Once rebooted and network-manger is in control everything is working fine.

If I remove network-manager from the model assertion, re-create the image, and try bootstrap again, everything works fine. Name resolution is working without a reboot.

It seems to me like there are two issues:

  • systemd-networkd fails to receive the dns IP and search path if network-manager is installed.
  • Snapd should probably orchestrate a system reboot after seeding the network-manager snap, otherwise it’s not being used, essentially [ perhaps this is actually something that should be orchestrated from the snap implementation, not sure ].

This on Ubuntu Core 20, x86, using the 20/stable track of network-manager.

Has anyone else observed this ? Does it should like a bug of some sort ?

Cheers, Just

This seems related - assuming it should be resolved: DNS resolution doesn't work on the first boot on core20 - #8 by abeato

Cheers, Just