Fixed
Created: Oct 25, 2023
Updated: Jan 9, 2024
Resolved Date: Dec 22, 2023
Found In Version: 10.22.33.12
Fix Version: 10.22.33.14
Severity: Standard
Applicable for: Wind River Linux LTS 22
Component/s: Userspace
Using an isolated namespace (LogNamespace) for one of their applications, this works fine in LTS21 (systemd v247.6) but in LTS22 (systemd v250.5) they are running into errors:
Apr 28 17:44:00 a-rinline2b systemd[467]: systemd-journald@tester.service: Failed to set up special execution directory in /var/log: Not a directory
Apr 28 17:44:00 a-rinline2b systemd[467]: systemd-journald@tester.service: Failed at step LOGS_DIRECTORY spawning /lib/systemd/systemd-journald: Not a directory
Setup a project with --machines qemuarm64 and build wrlinux-image-std.
$ runqemu nogrpahic
Paste the following snippet into the qemu instance:
cat << EOF > /lib/systemd/system/tester.service
[Unit]
Description=Tester Logging
[Service]
Type=simple
ExecStart=/bin/bash -c 'i=0; while true; do echo "hello \$i"; ((i++)); sleep 20; done'
LogNamespace=tester
[Install]
WantedBy=multi-user.target
EOF
cat << EOF > /lib/systemd/journald.conf.d/tester.conf
[Journal]
Storage=auto
EOF
Clear current logs:
$ journalctl --rotate; journalctl --vacuum-time=1s
Start the service:
$ systemctl start tester.service
Get status and logs
$ systemctl --failed
$ journalctl --no-pager
mkdir -p /var/log/journal
Setup a project with --machines qemuarm64 and build wrlinux-image-std.
$ runqemu nogrpahic
Paste the following snippet into the qemu instance:
cat << EOF > /lib/systemd/system/tester.service
[Unit]
Description=Tester Logging
[Service]
Type=simple
ExecStart=/bin/bash -c 'i=0; while true; do echo "hello \$i"; ((i++)); sleep 20; done'
LogNamespace=tester
[Install]
WantedBy=multi-user.target
EOF
cat << EOF > /lib/systemd/journald.conf.d/tester.conf
[Journal]
Storage=auto
EOF
Clear current logs:
$ journalctl --rotate; journalctl --vacuum-time=1s
Start the service:
$ systemctl start tester.service
Get status and logs
$ systemctl --failed
$ journalctl --no-pager