|
Bugzilla – Full Text Bug Listing |
| Summary: | systemd: sysv services should log errors to syslog | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 12.1 | Reporter: | Jan Engelhardt <jengelh> |
| Component: | Basesystem | Assignee: | Frederic Crozat <fcrozat> |
| Status: | VERIFIED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | crrodriguez, werner |
| Version: | Factory | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Found By: | Beta-Customer | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
Werner, Kay: what should systemd be doing here ? IMHO the messages as well as the exit status should be visible to the
executor. The last line done by /etc/rc.status is
exec /bin/systemctl $1 "${_rc_base}.service"
with _rc_base being the script. Also if a script reports at start or stop
an other exit status as for success an error should be mentioned in the
logs (IMHO).
It's a know current issue with sysv services. The error should show up in syslog, but we need to make sure that syslog itself will not get into a loop on error. It's currently being worked on upstream. The fix for now is to provide native service files, where all this can be configured fine-grained. Also syslog needs to be adopted to not use any sysv init script to be sure we don't create loops. marking as duplicate *** This bug has been marked as a duplicate of bug 732353 *** I can't say I am satisfied yet.
For comparison, rcnetwork behaves as expected, that is, the output goes to tty in any case:
silver:~ # /etc/init.d/network stop
redirecting to systemctl
Shutting down network interfaces:
eth0 device: Broadcom Corporation NetXtreme BCM5704 Gigabi done
eth1 device: Broadcom Corporation NetXtreme BCM5704 Gigabi
No configuration found for eth1
Nevertheless the interface will be shut down. done
Shutting down service network . . . . . . . . . done
Perfect that. Just dhcpd is not on the same track, although both are LSB scripts with active-exited semantics:
05:12 nakamura:/etc/sysconfig # rcdhcpd start
redirecting to systemctl
05:12 nakamura:/etc/sysconfig # systemctl status dhcpd.service
dhcpd.service - LSB: ISC DHCP 4.x Server
Loaded: loaded (/etc/init.d/dhcpd)
Active: active (exited) since Fri, 06 Jan 2012 05:12:57 +0100; 4s ago
Process: 2808 ExecStart=/etc/init.d/dhcpd start (code=exited, status=6/NOTCONFIGURED)
CGroup: name=systemd:/system/dhcpd.service
This is systemd-37 with your Dec 07 updates (--changelog) applied.
this is no way systemd will be change to output something different for each initscript (but feel free to ask upstream systemd to try to convince them). The only addition which will happen in the future is the relevant log for each service, when using systemctl status, thanks to systemd journal. What, there is a special case for rcnetwork? no special case for rcnetwork : it doesn't output anything more than systemctl status, when you run : rcnetwork status. (In reply to comment #6) > The only addition which will happen in the future is the relevant log for each > service, when using systemctl status, thanks to systemd journal. Which is now implemented . I've pushed a fix from upstream in package in home:fcrozat:systemd/systemd which ensure sysv services output is pushed to syslog in addition to console. Closing as fixed. This is an autogenerated message for OBS integration: This bug (681127) was mentioned in https://build.opensuse.org/request/show/106032 12.1 / systemd |
# rcdhcpd start # ps xaf | grep dhcp 13430 pts/3 S+ 0:00 \_ grep --color=auto dhcp So /etc/init.d/dhcpd did not start anything. Let's see: # systemctl status dhcpd.service dhcpd.service - LSB: ISC DHCP 4.x Server Loaded: loaded (/etc/init.d/dhcpd) Active: active (exited) since Sun, 20 Mar 2011 23:41:20 +0100; 3min 7s ago Process: 13116 ExecStart=/etc/init.d/dhcpd start (code=exited, status=6/NOTCONFIGURED) CGroup: name=systemd:/system/dhcpd.service But there is no mention in /var/log/messages or otherwise as to what actually went wrong. I changed /etc/rc.status temporarily: -if /bin/mountpoint -q /sys/fs/cgroup/systemd > /dev/null 2>&1 ; then +if false && /bin/mountpoint -q /sys/fs/cgroup/systemd > /dev/null 2>&1 ; then And then retried rcdhcpd, and it finally gave me the proper message: # rcdhcpd start Starting ISC DHCPv4 4.x Server ... set DHCPD_INTERFACE in /etc/sysconfig/dhcpd skipped A totally normal issue of humans missing out on config options, but it is real unfortunate nobody is going to see this much needed message with systemctl ATM.