Public bug reported:

I currently ran into the problem, that systemd (i.e. its resolved)
cannot properly configured to run with mdns.


I'm currently setting up some machines in a network with a poor router which 
routes and offers DHCP, but does not put the DHCP clients into a DNS domain, so 
the machines need to use mdns to find each other. 


In order to have systemd/resolved use mdns, two steps are necessary: 

1. MulticastDNS=yes must be put into /etc/systemd/resolved.conf and
resolved restarted to enable it in general.


2. It must be enabled per interface. On the command line this can be done with
resolvectl mdns eth0 yes

result:
# resolvectl mdns 
Global: yes
Link 63 (eth0): yes


and it works.


Problem: It cannot be done automatically in a server/LXD image. Im having this 
problem inside the LXD 22.04 image. 


a) man pages suggest that /etc/systemd/network/eth0.network 
[Match]
Name=eth0

[Network]
MulticastDNS=yes


would do the job, but it doesn't. It seems to be completely ignored.


The reason seems to be that 
networkctl status eth0 
shows 

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


so it seems to be overridden by netplan. 


b) netplan itself does not seem to support the MulticastDNS settings.


c) On Desktop Machines I found a workaround with NetworkManager, but on
server and LXD images, Network Manager does not exist.


So I do not see a way to have this configured permanently (other than
writing a systemd unit).


But:


I need to configure the machines / LXD machines using cloud-init, in order to 
have the installation pull packages from a server to be found with mdns. 

I tried to run 
resolvectl mdns eth0 yes

as a bootcmd in Cloud-init, but this has no effect, because it is too
early.


I tried to run it as a runcmd, and it works but it is too late, because package 
installation has already failed. 


So where in this scrub between systemd and netplan could mdns be enabled
in a way, that the automatic installation would work?

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2003025

Title:
  systemd/resolved can't enable mdns permanently

Status in systemd package in Ubuntu:
  New

Bug description:
  I currently ran into the problem, that systemd (i.e. its resolved)
  cannot properly configured to run with mdns.

  
  I'm currently setting up some machines in a network with a poor router which 
routes and offers DHCP, but does not put the DHCP clients into a DNS domain, so 
the machines need to use mdns to find each other. 

  
  In order to have systemd/resolved use mdns, two steps are necessary: 

  1. MulticastDNS=yes must be put into /etc/systemd/resolved.conf and
  resolved restarted to enable it in general.

  
  2. It must be enabled per interface. On the command line this can be done with
  resolvectl mdns eth0 yes

  result:
  # resolvectl mdns 
  Global: yes
  Link 63 (eth0): yes


  and it works.

  
  Problem: It cannot be done automatically in a server/LXD image. Im having 
this problem inside the LXD 22.04 image. 

  
  a) man pages suggest that /etc/systemd/network/eth0.network 
  [Match]
  Name=eth0

  [Network]
  MulticastDNS=yes


  would do the job, but it doesn't. It seems to be completely ignored.

  
  The reason seems to be that 
  networkctl status eth0 
  shows 

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

  
  so it seems to be overridden by netplan. 



  b) netplan itself does not seem to support the MulticastDNS settings.


  
  c) On Desktop Machines I found a workaround with NetworkManager, but on 
server and LXD images, Network Manager does not exist. 


  
  So I do not see a way to have this configured permanently (other than writing 
a systemd unit). 

  
  But:

  
  I need to configure the machines / LXD machines using cloud-init, in order to 
have the installation pull packages from a server to be found with mdns. 

  I tried to run 
  resolvectl mdns eth0 yes

  as a bootcmd in Cloud-init, but this has no effect, because it is too
  early.

  
  I tried to run it as a runcmd, and it works but it is too late, because 
package installation has already failed. 


  So where in this scrub between systemd and netplan could mdns be
  enabled in a way, that the automatic installation would work?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2003025/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to