[Bug 1177491] New: systemd ordering cycle with nss-lookup.target
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491 Bug ID: 1177491 Summary: systemd ordering cycle with nss-lookup.target Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: x86-64 OS: openSUSE Tumbleweed Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: screening-team-bugs@suse.de Reporter: conde.philippe@skynet.be QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- I have some errors at startup: sometimes I have nss_lookup.target which it not started , sometimes named is not started: first example Oct 04 13:33:12 hpprol2 systemd[1]: ntpd.service: Found ordering cycle on nss-lookup.target/start Oct 04 13:33:12 hpprol2 systemd[1]: ntpd.service: Found dependency on named.service/start Oct 04 13:33:12 hpprol2 systemd[1]: ntpd.service: Found dependency on time-sync.target/start Oct 04 13:33:12 hpprol2 systemd[1]: ntpd.service: Found dependency on ntpd.service/start Oct 04 13:33:12 hpprol2 systemd[1]: ntpd.service: Job nss-lookup.target/start deleted to break ordering cycle starting with ntpd.service/start second example Oct 07 07:41:35 hpprol2 systemd[1]: nss-lookup.target: Found ordering cycle on named.service/start Oct 07 07:41:35 hpprol2 systemd[1]: nss-lookup.target: Found dependency on time-sync.target/start Oct 07 07:41:35 hpprol2 systemd[1]: nss-lookup.target: Found dependency on ntpd.service/start Oct 07 07:41:35 hpprol2 systemd[1]: nss-lookup.target: Found dependency on nss-lookup.target/start On my system I have named, ntpd, wicked and ppp (rp-pppoe) This occurred since some weeks. When named is involved I can start it after boot with systemctl start named. nss-lookup.target cannot be started manually 1. ntpd.service contains [Unit] Description=NTP Server Daemon Documentation=man:ntpd(1) After=nss-lookup.target ... Before=time-sync.target ... 2 named.service contains ... After=time-sync.target Before=nss-lookup.target Wants=nss-lookup.target ... I have the filling that there is an incompatibily between ntpd and named about time-sync.target and nss-lookup.target. I have also found that if there is a purge of the kernel the error doesn't occurs. I suspect a race condition occuring when there is no kernel purge Let me know if you need more data. Regards -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491#c1
--- Comment #1 from Philippe Condé
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491#c2
--- Comment #2 from Philippe Condé
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491#c3
Josef Möllers
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491#c4
Philippe Condé
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491#c5
--- Comment #5 from Josef Möllers
Thanks this worked without error on ordering cycle
Great! Thanks for the feedback!
I have one more question:
Do I need changing the line "Wants=time-sync.target" to "Wants=time-set.target"?
Yes, please. Stay healthy! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491#c6
Karl Mistelberger
(In reply to Philippe Condé from comment #4)
Thanks this worked without error on ordering cycle
Great! Thanks for the feedback!
I have one more question:
Do I need changing the line "Wants=time-sync.target" to "Wants=time-set.target"?
Yes, please.
Stay healthy!
(In reply to Philippe Condé from comment #4)
Thanks this worked without error on ordering cycle I have one more question: in named.service I have [Unit] Description=Berkeley Internet Name Domain (DNS) After=network.target # After=time-sync.target After=time-set.target Before=nss-lookup.target Wants=nss-lookup.target Wants=time-sync.target
Do I need changing the line "Wants=time-sync.target" to "Wants=time-set.target"?
Many thanks in advance Philippe
Starting named thus early is risky. You never know whether time-sync will be reached at all. You may want to wait until target is reached: ~ # systemd-analyze critical-chain named.service named.service +169ms └─time-sync.target @1.275s └─chronyd.service @1.236s +38ms └─basic.target @1.235s └─sockets.target @1.235s └─pcscd.socket @1.235s └─sysinit.target @1.233s └─apparmor.service @437ms +795ms └─var.mount @417ms +18ms └─local-fs-pre.target @396ms └─systemd-tmpfiles-setup-dev.service @386ms +9ms └─kmod-static-nodes.service @322ms +51ms └─systemd-journald.socket └─-.mount └─system.slice └─-.slice Modifications required: ~ # systemd-delta -t overridden [OVERRIDDEN] /etc/systemd/system/named.service → /usr/lib/systemd/system/named.service --- /usr/lib/systemd/system/named.service 2020-10-24 15:31:49.000000000 +0200 +++ /etc/systemd/system/named.service 2020-11-02 17:02:04.516731187 +0100 @@ -2,7 +2,6 @@ Description=Berkeley Internet Name Domain (DNS) After=network.target After=time-sync.target -Before=nss-lookup.target Wants=nss-lookup.target Wants=time-sync.target -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491#c7
--- Comment #7 from Philippe Condé
~ # systemd-analyze critical-chain named.service
named.service +169ms └─time-sync.target @1.275s └─chronyd.service @1.236s +38ms └─basic.target @1.235s └─sockets.target @1.235s └─pcscd.socket @1.235s └─sysinit.target @1.233s └─apparmor.service @437ms +795ms └─var.mount @417ms +18ms └─local-fs-pre.target @396ms └─systemd-tmpfiles-setup-dev.service @386ms +9ms └─kmod-static-nodes.service @322ms +51ms └─systemd-journald.socket └─-.mount └─system.slice └─-.slice
Using time-set.target my critical chain is hpprol2:~ # systemd-analyze critical-chain time-sync.target The time when unit became active or started is printed after the "@" character. The time the unit took to start is printed after the "+" character. time-sync.target @50.737s └─ntpd.service @50.418s +317ms └─nss-lookup.target @50.413s └─named.service @48.524s +1.887s └─network.target @48.499s └─ppp@proximus.service @43.752s +4.745s └─wicked.service @13.464s +30.278s └─wickedd-nanny.service @13.391s +63ms └─wickedd.service @13.099s +281ms └─wickedd-dhcp4.service @12.908s +180ms └─network-pre.target @12.887s └─firewalld.service @9.073s +3.813s └─polkit.service @15.916s +448ms └─basic.target @9.006s └─sockets.target @9.004s └─virtlogd.socket @9.003s └─sysinit.target @8.953s └─systemd-udev-settle.service @2.873s +6.078s └─systemd-udev-trigger.service @2.254s +583ms └─systemd-udevd-kernel.socket @2.096s └─system.slice └─-.slice
Modifications required:
~ # systemd-delta -t overridden [OVERRIDDEN] /etc/systemd/system/named.service → /usr/lib/systemd/system/named.service
--- /usr/lib/systemd/system/named.service 2020-10-24 15:31:49.000000000 +0200 +++ /etc/systemd/system/named.service 2020-11-02 17:02:04.516731187 +0100 @@ -2,7 +2,6 @@ Description=Berkeley Internet Name Domain (DNS) After=network.target After=time-sync.target -Before=nss-lookup.target Wants=nss-lookup.target Wants=time-sync.target
If I understand correctly you suggest removing "Before=nss-lookup.target" ? Regards Philippe -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491#c8
--- Comment #8 from Karl Mistelberger
If I understand correctly you suggest removing "Before=nss-lookup.target" ? Regards Philippe
Confirmed. named.service has 3 requirements, which contradict each other: After=network.target After=time-sync.target Before=nss-lookup.target Dropping After=time-sync.target results in named starting before reliable time is available. Dropping Before=nss-lookup.target resolves the ordering problem. I guess After=network.target is covered by After=time-sync.target. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491#c9
--- Comment #9 from Philippe Condé
(In reply to Philippe Condé from comment #7)
If I understand correctly you suggest removing "Before=nss-lookup.target" ? Regards Philippe
Confirmed.
named.service has 3 requirements, which contradict each other:
After=network.target After=time-sync.target Before=nss-lookup.target
Dropping After=time-sync.target results in named starting before reliable time is available. Dropping Before=nss-lookup.target resolves the ordering problem. I guess After=network.target is covered by After=time-sync.target.
Ok, after reboot this morning I can confirm that after removing "Before=nss_lookup.target" there are no more error about ordering cycle and all other services are working. I suppose that this correction must be integrated in bind? Many thanks Philippe -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491#c10
--- Comment #10 from Karl Mistelberger
I suppose that this correction must be integrated in bind?
Yes. The changes goes to /usr/lib/systemd/system/named.service which is owned by package bind. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491
http://bugzilla.opensuse.org/show_bug.cgi?id=1177491#c11
Josef Möllers
participants (1)
-
bugzilla_noreply@suse.com