[Pkg-dns-devel] Bug#826241: Bug#826241: Bug#826241: Bug#826241: Bug#826241: unbound: Provide $named facility under systemd
Michael Biebl
biebl at debian.org
Thu Jul 14 10:27:07 UTC 2016
Am 14.07.2016 um 08:22 schrieb Martin Pitt:
> 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.
I don't see a reason to only apply --ignore-dependencies only on boot
and for reload. Maybe we should just run it unconditionally (line 65).
That would make the behaviour more consistent.
I think I mentioned that already in an earlier email.
I'd be fine with that change fwiw.
That said, once the postfix hook (or any other hook for that matter)
uses invoke-rc.d, unbound-resolvconf.service would be affected again.
This is the reason I switched this service to Type=simple, so it
shouldn't actually block for completion and we'd be independent from
what the hooks are doing.
Maybe Robert still has the old service which used Type=oneshot in /etc?
Regards,
Michael
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-dns-devel/attachments/20160714/d4d048aa/attachment.sig>
More information about the pkg-dns-devel
mailing list