-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Hello,
We have an issue that appears after upgrading to Fedora CoreOS 37.20230401.3.0 to 38.20230414.3.0 (later version are affected as well). It might be related to systemd/journald packages upgrade (full list of changes can be found here https://fedoraproject.org/coreos/release-notes/?arch=x86_64&stream=stable)
Details
Distributive: Fedora CoreOS 38.20230414.3.0 and later
Systemd version: systemd 253 (253.7-1.fc38)
Fluentd: v1.16-1 as a container process in systemd unit service
User: example - rootless user (added to the group systemd-journal)
Config
fluentd.service:
[Unit]
Description=Fluentd
Requires=afterburn.service
After=afterburn.service systemd-logind.service network-online.target
[Install]
WantedBy=multi-user.target
[Service]
User=example
Restart=on-failure
EnvironmentFile=/run/metadata/afterburn
RestartSec=30
SyslogIdentifier=fluentd
ExecStartPre=/bin/bash -c '/bin/loginctl enable-linger $(/usr/bin/id -u example)'
ExecStartPre=/usr/bin/podman pull fluent/fluentd:v1.16-1
ExecStartPre=-/usr/bin/podman rm -f fluentd
ExecStart=/usr/bin/podman run --name fluentd --log-opt max-size=10m --log-opt max-file=3 -p 24224:24224 -p 24231:24231 -v /var/log/journal:/var/log/journal:ro -v /etc/fluentd:/fluentd/etc:ro fluent/fluentdv1.16-1
:v1.16-1
fluentd.conf:
<source>
@type systems
@id systemd-example
tag example
path /var/log/journal
read_from_head false
matches [{ "_SYSTEMD_UNIT": "example.service" }] # replace with any real service
<entry>
fields_strip_underscores true
fields_lowercase true
</entry>
</source>
<match example>
@type stdout
@id systemd-stdout-example
</match>
Issue
No logs are read from systemd. No logs from stdout about any fluentd entry (same as in https://github.com/fluent-plugin-systemd/fluent-plugin-systemd#when-i-look-at-fluentd-logs-everything-looks-fine-but-no-journal-logs-are-read-)
Expected results
Logs are read and send to stdout
Workaround
Use Fedora CoreOS 37.20230401.3.0 and older (systemd 251)
Btw, running of fluent-bit with similar config works correct (same user, similar fluent and systemd config).