1

Recently I installed DevStack (OpenStack distro) on my servers. I uploaded there Ubuntu server 20.04 LTS cloud image as well as Ubuntu Server 22.04 LTS cloud image. The images came from https://cloud-images.ubuntu.com/. Now when I run Ubuntu Server 20.04 VM everything works fine and systemd-resolved.service is running properly. I can ping www.google.com and so on. But when I run Ubuntu 22.04 LTS the systemd-resolved.service fails to start with the following message:

ubuntu@test:~$ sudo systemctl status systemd-resolved.service
× systemd-resolved.service - Network Name Resolution
     Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2023-04-05 14:53:46 UTC; 47s ago
       Docs: man:systemd-resolved.service(8)
             man:org.freedesktop.resolve1(5)
             https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
             https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
    Process: 569 ExecStart=/lib/systemd/systemd-resolved (code=exited, status=1/FAILURE)
   Main PID: 569 (code=exited, status=1/FAILURE)
      Error: 99 (Cannot assign requested address)
        CPU: 79ms

Apr 05 14:53:46 test systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=1/FAILURE Apr 05 14:53:46 test systemd[1]: systemd-resolved.service: Failed with result 'exit-code'. Apr 05 14:53:46 test systemd[1]: Failed to start Network Name Resolution. Apr 05 14:53:46 test systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 5. Apr 05 14:53:46 test systemd[1]: Stopped Network Name Resolution. Apr 05 14:53:46 test systemd[1]: systemd-resolved.service: Start request repeated too quickly. Apr 05 14:53:46 test systemd[1]: systemd-resolved.service: Failed with result 'exit-code'. Apr 05 14:53:46 test systemd[1]: Failed to start Network Name Resolution.

I even created a VM with Ubuntu 22.04 LTS on the host machine using multipass and the systemd-resolved.service started properly. Then I uploaded the multipass Ubuntu 22.04 LTS image to the OpenStack and the same error appeard.

I also tried to run Ubuntu 20.04 LTS VM in OpenStack to check if systemd-resolved.service is running fine. It was correct so then I decided to upgrade Ubuntu to 22.04 using sudo do-release-upgrade -d. After the upgrade systemd-resolved.service once again failed to start.

I don't have any idea how to fix that and where to look for any hint. I feel like I lack of DevStack knowledge as well as systemd knowledge to troubleshoot this. Any help will be very appreciated!

1 Answers1

0

This issue is directly attributed to openstack issuing a route via cloud-init

127.0.0.53 dev ens3 proto dhcp scope host metric 100

problems with systemd-resloved not being able to bind to 127.0.0.53. Systemd-resloved does not bind to 127.0.0.53.

The root cause is that the ml2 plugin in openstack does not explicitly configure [ovn] dns_servers causing the openstack controller /etc/resolv.conf to leak to the instance see this

So, configure netutron ml2 plugins and restart everything to fix it!

wusheng
  • 1
  • 1