[Pkg-dns-devel] Bug#826241: Bug#826241: Bug#826241: Bug#826241: Bug#826241: unbound: Provide $named facility under systemd

Martin Pitt mpitt at debian.org
Thu Jul 14 06:22:19 UTC 2016


Hello Robert,

Robert Edmonds [2016-07-09 17:36 -0400]:
> But it looks like “systemctl restart unbound“ takes 90 seconds to
> complete, though it eventually exits with return code 0. When “systemctl
> restart unbound“ is running, I see the following initially printed to
> the journal:
> 
> Jul 09 21:25:08 debian systemd[1]: Stopping Unbound DNS server via resolvconf...
> Jul 09 21:25:08 debian systemd[1]: Stopped target Host and Network Name Lookups.
> Jul 09 21:25:08 debian systemd[1]: Stopping Host and Network Name Lookups.
> 
> “systemctl list-jobs“ shows the following, with job 228 highlighted:
> 
>     JOB UNIT                       TYPE    STATE  
>     227 nss-lookup.target          start   waiting
>     228 unbound-resolvconf.service restart running
>     166 unbound.service            restart waiting
>     229 postfix.service            reload  waiting
> 
>     4 jobs listed.
> 
> and I see this familiar group of processes in the process tree:
> 
> [...] /bin/sh -e /usr/lib/unbound/package-helper resolvconf_stop
> [...]  \_ run-parts --arg=-d --arg=lo.unbound /etc/resolvconf/update.d
> [...]      \_ run-parts /etc/resolvconf/update-libc.d
> [...]          \_ /bin/sh -e /etc/resolvconf/update-libc.d/postfix
> [...]              \_ /bin/sh -e /etc/init.d/postfix reload
> [...]                  \_ /bin/systemctl --no-pager reload postfix.service
> 
> Then, about 90 seconds after “systemctl restart unbound“ is executed,
> the following is written to the journal:

This looks like a deadlock indeed - nss-lookup.target is waiting on
unbound, unbound is waiting on postfix (through the if-up.d hook), and
/etc/init.d/postfix has "Required-Start: $named" which translates to
nss-lookup.target.

I think we can safely break this kind of cycle with "reload" and
"force-reload" (but not with "restart"). Can you please check if
applying the attached patch to /lib/lsb/init-functions.d/40-systemd
helps?

@Michael: This will ignore job dependencies for (force-)reload,
similar to what we already do on bootup. IMHO this is safe.

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 40-systemd.patch
Type: text/x-diff
Size: 369 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dns-devel/attachments/20160714/fd21fda7/attachment.patch>


More information about the pkg-dns-devel mailing list