On Tue, Jun 19, 2018 at 9:41 AM Hadmut Danisch <had...@danisch.de> wrote:
>
> dnsmasq _after_ networking?
>
> Isn't it part of networking and should be running and ready for other
> services depending on networking?

Yes, but it's complicated; see below.

>
>
> (my guess is that Ubuntu has never defined the targets very precisely. it 
> should distinguish between low level /interface level configuration and 
> networking services.)
>

This is rather precisely defined; not by Ubuntu but by the init
system.  In systemd there are many targets that indicate various state
of the system during boot[1][2]
For networking, the ones that matter are:

network-pre.target (before systemd has attempted to bring the network up)
network.target (systemd has started to bring network up; for
Artful/Bionic, this means systemd-networkd.service has started)
network-online.target ("required" networking interfaces are up,
configured, routable)

Dnsmasq itself is a networking service, so arguably, it is fine to run
at After=network.target; but network.target does not guarantee that
all of networking has been configured.  Dnsmasq has two choices.  1)
it can run later, at network-online.target which means systemd is
done with creating and configuring interfaces.  2) start at
After=network.target but listen to dbus or netlink layer to react to
when a
configured interface is present and ready for it to use.

Since dnsmasq does not watch dbus or netlink for new interfaces and
when they're configured, then the only solution is to run after such
a time that the configured interfaces are ready for use by dnsmasq.

1. https://www.freedesktop.org/software/systemd/man/systemd.special.html
2. https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1777094
>
> Title:
>   dnsmasq started too early, not getting all interfaces
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1777094/+subscriptions

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

Title:
  dnsmasq started too early, not getting all interfaces

Status in dnsmasq package in Ubuntu:
  Incomplete
Status in netplan.io package in Ubuntu:
  Incomplete

Bug description:
  Hi,

  I'm still struggling with 18.04 and the move from ifupdown to netplan.

  I am running a local virtual linux bridge as a network for several
  virtual machines and containers, which is to be serviced with dhcp and
  dns by dnsmasq.

  Conforming to latest designs from Ubuntu the bridge is now started by
  netplan and configured in /etc/netplan/60-vlan0.yaml straightforward.

  Since there is no ifupdown-scripts anymore, I've configured the
  default dnsmasq daemon in /etc/dnsmasq.d/vlan0 to offer dhcp for that
  bridge.

  
  This works only when started manually. 

  When booting ubuntu the normal way, the bridge is correctly generated,
  and dnsmasq is running, but it does *not* offer DNS for the bridge and
  does not occupy its port 53. But just a manual systemctl restart
  dnsmasq.service make it run as expected, then everything is fine.

  So my guess is that my configuration is correct, but dnsmasq simply
  started to early, i.e. before the bridge is created, and thus does not
  see the bridge when starting up.

  There's something wrong in the dependencies of the startup
  configuration.

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: dnsmasq 2.79-1
  ProcVersionSignature: Ubuntu 4.15.0-23.25-generic 4.15.18
  Uname: Linux 4.15.0-23-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.20.9-0ubuntu7.2
  Architecture: amd64
  CurrentDesktop: LXDE
  Date: Fri Jun 15 10:59:43 2018
  InstallationDate: Installed on 2018-04-30 (45 days ago)
  InstallationMedia: Lubuntu 18.04 LTS "Bionic Beaver" - Release amd64 
(20180426)
  PackageArchitecture: all
  SourcePackage: dnsmasq
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1777094/+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