Ordering cycle at boot with nss-lookup

Hello,
I noticed that named was not started when I reboot my system.
My system start wicked, ntpd, dhcpd , pppd and named servers
I find this status error

# systemctl status named
● named.service - Berkeley Internet Name Domain (DNS)
     Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
     Active: inactive (dead)

Jul 02 08:13:40 hpprol2 systemd[1]: nss-lookup.target: Found ordering cycle on named.service/start
Jul 02 08:13:40 hpprol2 systemd[1]: nss-lookup.target: Found dependency on time-sync.target/start
Jul 02 08:13:40 hpprol2 systemd[1]: nss-lookup.target: Found dependency on ntpd.service/start
Jul 02 08:13:40 hpprol2 systemd[1]: nss-lookup.target: Found dependency on nss-lookup.target/start
Jul 02 08:13:40 hpprol2 systemd[1]: nss-lookup.target: Job named.service/start deleted to break ordering cycle starting with nss-lookup.target/start

If I look in journalctl I see that these messages occur very early (just after the start of journal) before the start of wicked, pppd and ntpd.
There is also none other messages about nss-lookup.
Can it be due to an analyze of some systemd scripts?
One thing that I find strange is that this error doesn’t occurs if I do a reboot after installing a new kernel (and also a purge of old kernel) :question:

Any idea where to look?
Should I open a bug report?

Many thanks in advance
Philippe

Command you quoted worked perfectly, and indeed revealed dependency on basic.target. It’s a shame that the toolset for systemctl is so lacking, but oh well, it’s a new project.

I got two identical Raspberry Pi systems installed early august 2020 of which one exhibits the behaviour every now and then and the other does not.

This gives me the feeling it is somehow timing-dependent.

The workaround is to manually start named after boot (like rcnamed start): that has worked for now on the failing system.

–jeroen

Hello,

I opened un bug report https://bugzilla.opensuse.org/show_bug.cgi?id=1177491.
A working solution is proposed by karl.mistelberger removing in named.service the line

"Before=nss-lookup.target"

See comment 6 and 8 in this bug

Regards
Philippe

Thanks Philippe.

In the meantime, that solution has been promoted to fix as per comment #13 in https://bugzilla.opensuse.org/show_bug.cgi?id=1177491#c13

Regards,

–jeroen