Bug#762700: systemd: journald fails to forward most boot messages to syslog
Michael Biebl
biebl at debian.org
Tue Mar 3 15:26:07 GMT 2015
Am 03.03.2015 um 16:00 schrieb Michael Biebl:
> Am 03.03.2015 um 15:33 schrieb Michael Biebl:
>> Am 02.03.2015 um 15:42 schrieb Christian Seiler:
>>
>>> - SOLUTION (mostly the same as before, but SendBuffer is set on a
>>> different unit and a Condition is added to the service):
>>>
>>> 1. Increase max_dgram_qlen to a reasonable value. The easiest
>>> way is via a systemd service:
>>>
>>> /lib/systemd/system/systemd-setup-dgram-qlen.service:
>>> [Unit]
>>> DefaultDependencies=no
>>> Before=syslog.socket
>>> ConditionPathIsReadWrite=/proc/sys/net/unix/max_dgram_qlen
>>>
>>> [Service]
>>> Type=oneshot
>>> ExecStart=/sbin/sysctl -w net.unix.max_dgram_qlen=512
>>> StandardOutput=null
>>
>> A proper Description= is missing and it probably should have
>> RemainAfterExit=yes.
>> That said, why not simply use a sysctl.d conf snippet?
>
>
> I just tried the following:
> # cat /usr/lib/sysctl.d/50-qlen.conf
> net.unix.max_dgram_qlen=512
>
> and adding "RequiresMountsFor=/usr/lib/sysctl.d/" to
> systemd-sysctl.service (a change we should apply independently of this
> issue, given that we won't get the usr-mount patches for initramfs-tools
> in jessie).
>
> This seems to be sufficient to get rid of the "Forwarding to syslog
> missed XXX messages."
>
>>> Add the following to /lib/systemd/systemd/syslog.socket:
>>> Wants=systemd-setup-dgram-qlen.service
>
> I didn't add an explicit Ordering to syslog.socket
> (After=systemd-sysctl.service). Will need to check if I was just lucky
> and without that it would be racy, or if the ordering is already correct.
I did a couple more reboots and did indeed run into the problem, that
systemd-sysctl.service was started after syslog.socket, so I got the
"missed XXX messages" again.
Adding the After=systemd-sysctl.service ordering to syslog.socket fixed
that. In [1] you mentioned, that a sysctl snippet is no option. Can you
elaborate why? I'd really like to avoid shipping an extra service for
this. Since systemd-sysctl.service uses DefaultDependencies=no as well,
it can run pretty early.
Michael
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762700#32
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20150303/b4ac68ac/attachment-0002.sig>
More information about the Pkg-systemd-maintainers
mailing list