tmpfiles.d: Add /var/log as entry for baselayout.conf#29
Merged
pothos merged 1 commit intoflatcar-masterfrom Apr 4, 2023
Merged
tmpfiles.d: Add /var/log as entry for baselayout.conf#29pothos merged 1 commit intoflatcar-masterfrom
pothos merged 1 commit intoflatcar-masterfrom
Conversation
2 tasks
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Mar 30, 2023
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Mar 30, 2023
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
tormath1
reviewed
Mar 30, 2023
| L /var/run - - - - ../run | ||
| # Explicit add of /var/log here even if it has a duplicate in var.conf | ||
| # but for the initrd we don't apply var.conf | ||
| d /var/log 0755 - - - - |
Contributor
There was a problem hiding this comment.
what do you think of adding /var/log/journal too? As mentioned in the manual: https://www.man7.org/linux/man-pages/man8/systemd-journald.service.8.html
On systems where /var/log/journal/ does not exist yet but where
persistent logging is desired (and the default journald.conf is
used), it is sufficient to create the directory, and ensure it
has the correct access modes and ownership:
mkdir -p /var/log/journal
systemd-tmpfiles --create --prefix /var/log/journal
Something like:
z /var/log/journal 2755 root systemd-journal - -
Member
Author
There was a problem hiding this comment.
Oh, right, forgot that this is what we wanted and it's in a different file
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Mar 31, 2023
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Mar 31, 2023
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Apr 3, 2023
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
krnowak
approved these changes
Apr 3, 2023
The persisting of logs on first boot didn't work anymore because /var/log wasn't created early enough as Mathieu found out. The /var/log directory is set up by var.conf/systemd.conf from systemd which we can't easily apply from the initrd due to the utmp user defined there. As workaround, add /var/log also to baselayout.conf which gets applied from the initrd - but even here we have to copy the systemd-journal group over to /sysroot/etc/group because systemd-tmpfiles only looks there and doesn't load the libc and its nss plugin from the chroot.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Apr 4, 2023
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Apr 4, 2023
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Apr 4, 2023
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Apr 4, 2023
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Apr 4, 2023
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Apr 4, 2023
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
t-lo
pushed a commit
to flatcar/scripts
that referenced
this pull request
Apr 13, 2023
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
t-lo
pushed a commit
to flatcar/scripts
that referenced
this pull request
Apr 17, 2023
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The persisting of logs on first boot didn't work anymore because /var/log wasn't created early enough as Mathieu found out. The /var/log directory is set up by var.conf from systemd which we can't easily apply from the initrd due to the utmp user defined there. As workaround, add /var/log also to baselayout.conf which gets applied
from the initrd - but even here we have to copy the systemd-journal
group over to /sysroot/etc/group because systemd-tmpfiles only looks
there and doesn't load the libc and its nss plugin from the chroot.
How to use
Backport to Alpha
Testing done
see flatcar/bootengine#60