[Bug 2003026] [NEW] netplan overrides systemd network configuration, but does not support mdns settings

Hadmut Danisch 2003026 at bugs.launchpad.net
Mon Jan 16 23:55:35 UTC 2023


Public bug reported:

Using Ubuntu 22.04:

netplan blocks and inhibits the MulticastDNS configuration in
systemd/resolved.


I'm in a network with a poor router, which doesn't put DHCP clients into a DNS zone, so machines need to find each other with mdns. Since netplan overrides the systemd network configuration, but does not support mdns itself, it effectively makes it impossible to properly configure mdns. 

In order to have mdns running, two steps are required:

1. it must be enabled in common in /etc/systemd/resolved.conf

2. it must be configured per device, eg. command line  resolvectl mdns
eth0 yes


But to have it configured automatically, systemd/resolved use the method of having 

/etc/systemd/network/eth0.network 
[Match]
Name=eth0

[Network]
MulticastDNS=yes


which has no effect at all. the reason seems to be that netplan
overrides this:

# networkctl status eth0
...
                  Network File: /run/systemd/network/10-netplan-eth0.network
...

thus resolved/systemd seem to use this file instead of the handmade one.


So there seems to be no proper way to enable mdns. 


The further problem is, that I cannot simply add a systemd unit to run this command, because the problem already occurs in cloud-init installations. There's two ways to run the command:

a) as a bootcmd, but has no effect, because too early in boot process.

b) as a runcmd, which works, but comes too late, package installation by
cloud-init has already failed then.


So netplan effectively seems to break the mdns functionality of systemd by overriding the configuration but not supporting mdns.

** Affects: netplan.io (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netplan.io in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/2003026

Title:
  netplan overrides systemd network configuration, but does not support
  mdns settings

Status in netplan.io package in Ubuntu:
  New

Bug description:
  Using Ubuntu 22.04:

  netplan blocks and inhibits the MulticastDNS configuration in
  systemd/resolved.

  
  I'm in a network with a poor router, which doesn't put DHCP clients into a DNS zone, so machines need to find each other with mdns. Since netplan overrides the systemd network configuration, but does not support mdns itself, it effectively makes it impossible to properly configure mdns. 

  In order to have mdns running, two steps are required:

  1. it must be enabled in common in /etc/systemd/resolved.conf

  2. it must be configured per device, eg. command line  resolvectl mdns
  eth0 yes

  
  But to have it configured automatically, systemd/resolved use the method of having 

  /etc/systemd/network/eth0.network 
  [Match]
  Name=eth0

  [Network]
  MulticastDNS=yes


  which has no effect at all. the reason seems to be that netplan
  overrides this:

  # networkctl status eth0
  ...
                    Network File: /run/systemd/network/10-netplan-eth0.network
  ...

  thus resolved/systemd seem to use this file instead of the handmade
  one.

  
  So there seems to be no proper way to enable mdns. 

  
  The further problem is, that I cannot simply add a systemd unit to run this command, because the problem already occurs in cloud-init installations. There's two ways to run the command:

  a) as a bootcmd, but has no effect, because too early in boot process.

  b) as a runcmd, which works, but comes too late, package installation
  by cloud-init has already failed then.

  
  So netplan effectively seems to break the mdns functionality of systemd by overriding the configuration but not supporting mdns.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2003026/+subscriptions




More information about the foundations-bugs mailing list