Bug 684152
Summary: | RFE: systemd should connect SysV serivce output with syslog by default | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jóhann B. Guðmundsson <johannbg> |
Component: | systemd | Assignee: | Lennart Poettering <lpoetter> |
Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 15 | CC: | johannbg, k.georgiou, lpoetter, metherid, mschmidt, notting, plautrba |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-10-07 17:49:49 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jóhann B. Guðmundsson
2011-03-11 10:23:48 UTC
This can be done by editing /etc/systemd/system.conf as follows: DefaultStandardOutput=syslog DefaultStandardError=syslog or via systemd.default_standard_output=, systemd.default_standard_error= on the boot command line. (syslog+console is also accepted, but is probably a bad idea.) You must be very careful with that since this might trigger a loop when you this way connect stdout/stderr of your syslog daemon with syslog. In F16 we plan to make DefaultStandardOutput=syslog the default, since at that point we will mandate that all syslog implementations *must* use native unit files, which override the default explicitly (which you cannot do with SysV). Since all sysloggers nowadays are patched this should not be a problem. (In reply to comment #1) > This can be done by editing /etc/systemd/system.conf as follows: > > DefaultStandardOutput=syslog > DefaultStandardError=syslog > > or via systemd.default_standard_output=, systemd.default_standard_error= on the > boot command line. > > (syslog+console is also accepted, but is probably a bad idea.) This could be solved in the best way if systemd defaulted to ouput the status of a service when it gets manually started as in as opposed to show you nothing.. # systemctl start sshd.service It would show you this.. # systemctl start sshd.service sshd.service - OpenSSH server daemon. Loaded: loaded (/lib/systemd/system/sshd.service) Active: active (running) since Tue, 10 May 2011 22:27:01 +0000; 5s ago Process: 6478 ExecStart=/usr/sbin/sshd $OPTIONS (code=exited, status=0/SUCCESS) Process: 6476 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS) Main PID: 6479 (sshd) CGroup: name=systemd:/system/sshd.service └ 6479 /usr/sbin/sshd Or this if it failed which btw is much more meaningful than "Job failed. See system logs and 'systemctl status' for details. # systemctl start sshd.service sshd.service - OpenSSH server daemon. Loaded: loaded (/lib/systemd/system/sshd.service) Active: failed since Tue, 10 May 2011 22:27:40 +0000; 20s ago Process: 6478 ExecStart=/usr/sbin/sshd $OPTIONS (code=exited, status=0/SUCCESS) Process: 6488 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255) Main PID: 6479 (code=exited, status=255) CGroup: name=systemd:/system/sshd.service Admins are forced to run systemst status afterwards or start tailing logs or as you propose change conf file to get the output that was previously presented to them with [OK] or [Failed] ( sometimes with syntax error pointing to the line if syntax checking was supported ). That's an significant step backwards for admins from my pov... In F16 we are setting "DefaultStandardOutput=syslog" in the default configuration. |