[Bug 721426] New: systemd: systemctl status foo.service lies
https://bugzilla.novell.com/show_bug.cgi?id=721426 https://bugzilla.novell.com/show_bug.cgi?id=721426#c0 Summary: systemd: systemctl status foo.service lies Classification: openSUSE Product: openSUSE 12.1 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: Basesystem AssignedTo: fcrozat@suse.com ReportedBy: lnussel@suse.com QAContact: qa@suse.de Found By: --- Blocker: --- For sysv services systemctl status reports active even when the daemon exited: nscd.service - LSB: Start Name Service Cache Daemon Loaded: loaded (/etc/init.d/nscd) Active: active (running) since Fri, 30 Sep 2011 08:50:22 +0200; 1s ago Process: 6667 ExecStop=/etc/init.d/nscd stop (code=exited, status=0/SUCCESS) Process: 6678 ExecStart=/etc/init.d/nscd start (code=exited, status=0/SUCCESS) Main PID: 6686 (nscd) CGroup: name=systemd:/system/nscd.service └ 6686 /usr/sbin/nscd blah:~ # echo $? 0 blah:~ # killall nscd blah:~ # systemctl status nscd.service nscd.service - LSB: Start Name Service Cache Daemon Loaded: loaded (/etc/init.d/nscd) Active: active (exited) since Fri, 30 Sep 2011 08:50:22 +0200; 22s ago Process: 6667 ExecStop=/etc/init.d/nscd stop (code=exited, status=0/SUCCESS) Process: 6678 ExecStart=/etc/init.d/nscd start (code=exited, status=0/SUCCESS) Main PID: 6686 (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/nscd.service blah:~ # echo $? 0 Moreover, systemctl start now doesn't start it anymore: blah:~ # systemctl start nscd.service blah:~ # echo $? 0 blah:~ # systemctl status nscd.service nscd.service - LSB: Start Name Service Cache Daemon Loaded: loaded (/etc/init.d/nscd) Active: active (exited) since Fri, 30 Sep 2011 08:50:22 +0200; 48s ago Process: 6667 ExecStop=/etc/init.d/nscd stop (code=exited, status=0/SUCCESS) Process: 6678 ExecStart=/etc/init.d/nscd start (code=exited, status=0/SUCCESS) Main PID: 6686 (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/nscd.service -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=721426 https://bugzilla.novell.com/show_bug.cgi?id=721426#c1 --- Comment #1 from Ludwig Nussel <lnussel@suse.com> 2011-09-30 10:54:06 CEST --- Note since init scripts are automatically wrapped through systemctl the usual rcfoo calls do not behave as expected either of course. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=721426 https://bugzilla.novell.com/show_bug.cgi?id=721426#c2 --- Comment #2 from Frederic Crozat <fcrozat@suse.com> 2011-09-30 09:37:39 UTC --- unfortunately, LSB headers in initscripts is not providing PID filename which would help systemd to detect if a initscript is for an "daemon" or just for "action". This is why initscripts are started as if "RemainAfterExit=true" is set. I'm not sure if we should change this, since every initscript not starting daemon would be seen as "failed". -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=721426 https://bugzilla.novell.com/show_bug.cgi?id=721426#c3 --- Comment #3 from Ludwig Nussel <lnussel@suse.com> 2011-09-30 11:48:09 CEST --- Couldn't systemd be smarter? I mean if the init script exits successfully with no daemon left behind then maybe it's "RemainAfterExit=true" indeed. If a daemon is left running it "RemainAfterExit=true" likely was wrong so it could reset it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=721426 https://bugzilla.novell.com/show_bug.cgi?id=721426#c4 --- Comment #4 from Frederic Crozat <fcrozat@suse.com> 2011-09-30 11:29:40 UTC --- I've sent a patch which improves systemd behaviour to change RemainAfterExit depending if a daemon was started or not. http://lists.freedesktop.org/archives/systemd-devel/2011-September/003540.ht... I'm waiting for upstream decision on it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=721426 https://bugzilla.novell.com/show_bug.cgi?id=721426#c5 Frederic Crozat <fcrozat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #5 from Frederic Crozat <fcrozat@suse.com> 2011-10-12 08:55:49 UTC --- closing as fixed in openSUSE, although upstream is afraid of race condition with the patch. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com