Michael Stapelberg wrote:
> Hi Sjoerd,
> 
>> When using systemd starting dnsmasq just hangs and times out.. Also the sysv
>> init script seems to have a reasonable amount of functionality that the
>> systemd
>> one does not have, so i'm not sure if switching now is the right thing.
> Which version of systemd do you use? I tested the service file with systemd 29
> and it works just fine:
> 
> michael ~ $ sudo systemctl start dnsmasq.service 
> michael ~ $ systemctl status dnsmasq.service
> dnsmasq.service - A lightweight DHCP and caching DNS server
>         Loaded: loaded (/lib/systemd/system/dnsmasq.service)
>         Active: active (running) since Fri, 02 Sep 2011 16:25:45 +0200; 700ms 
> ago
>        Process: 28971 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, 
> status=0/SUCCESS)
>       Main PID: 28973 (dnsmasq)
>         CGroup: name=systemd:/system/dnsmasq.service
>                 └ 28973 /usr/sbin/dnsmasq -k
> 
> Can you please do the following?
> 
> 1) Run strace -o /tmp/strace.log -fF -tt -s2048 -p 1
> 2) Run systemctl start dnsmasq.service
> 3) Attach the (bzip2'ed) contents of /tmp/strace.log
> 
> That will allow us to better see what’s going on.
> 
> As for the functionality:
> 
>  • The init script provides support for the ENABLED flag in
>    /etc/default/dnsmasq, which you don’t need when using systemd -- systemd
>    supports enable/disable: systemctl disable dnsmasq.service
> 
>  • It runs dnsmasq as user 'dnsmasq' - I missed this one and we can easily add
>    it to the service file (User=dnsmasq in the [Service] section).
>    Simon, what do you think? Is running dnsmasq as user dnsmasq by default a
>    sensible decision?

Yes, it is.

> 
>  • The resolvconf stuff I regard as obsolete when using NetworkManager or some
>    other configuration tool.

Hmm, I'm not going to argue that one ;-)

> 
>  • LANG gets set if it is defined in /etc/default/locale. I’m not sure what 
> the
>    effects of that are (I don’t set LANG on my system, I prefer the LC_*
>    settings). Does it somehow affect the behaviour of dnsmasq when resolving?
>    If so, how?

It affects the charset used when reading internationalised domain names
from configuration files and the translation used for messages. It's needed.

> 
>  • As for configuration via flags (all these environment variables): In
>    general, the systemd way is to configure programs in their own 
> configuration
>    files, so /etc/dnsmasq.conf is the place where all this should be 
> configured.
> 
>    Simon: Are there any options which are *only* available via command line 
> and
>    *not* in /etc/dnsmasq.conf that are reasonable for users to change? If so,
>    which ones?

There are none which can't be changed from the configuration file, and
most of the environment variables are indeed obsolete: The non-obsolete
ones are documented in the /etc/default/dnsmasq file.

1) set the domain to the system value
2) use a different configuration file.
3) set a couple of options which are needed by the Debian installation,
without requiring the  user to have them in the configuration file.
These are the dnsmasq user, and the CONFIG_DIR value.

4) ENABLED and IGNORE_REOLVCONF, which would seem to be not relevant in
a systemd world.
> 
> Did I miss any functionality?
>

The initscript sleeps for a couple of seconds between stopping and then
starting the daemon on a restart. That is necessary.

Cheers,

Simon.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to