flatcar-tmpfiles: Always copy missing entries over to the database#26
Merged
pothos merged 1 commit intoflatcar-masterfrom Jan 20, 2023
Merged
flatcar-tmpfiles: Always copy missing entries over to the database#26pothos merged 1 commit intoflatcar-masterfrom
pothos merged 1 commit intoflatcar-masterfrom
Conversation
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Jan 17, 2023
This pulls in flatcar/baselayout#26 to fix the regression in Alpha/Beta (itself a fix for another regression) where systemd-tmpfiles bailed if /etc/passwd|group didn't have the core user, now solved by always copying missing entries over to the databases, not only if the files didn't exist.
2 tasks
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Jan 18, 2023
This pulls in flatcar/baselayout#26 to fix the regression in Alpha/Beta (itself a fix for another regression) where systemd-tmpfiles bailed if /etc/passwd|group didn't have the core user, now solved by always copying missing entries over to the databases, not only if the files didn't exist.
3444ce2 to
5ea75b4
Compare
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Jan 18, 2023
This pulls in flatcar/baselayout#26 to fix the regression in Alpha/Beta (itself a fix for another regression) where systemd-tmpfiles bailed if /etc/passwd|group didn't have the core user, now solved by always copying missing entries over to the databases, not only if the files didn't exist.
krnowak
reviewed
Jan 19, 2023
5ea75b4 to
ad658ee
Compare
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Jan 19, 2023
This pulls in flatcar/baselayout#26 to fix the regression in Alpha/Beta (itself a fix for another regression) where systemd-tmpfiles bailed if /etc/passwd|group didn't have the core user, now solved by always copying missing entries over to the databases, not only if the files didn't exist.
krnowak
approved these changes
Jan 20, 2023
Member
krnowak
left a comment
There was a problem hiding this comment.
Looks good, had only some comment nitpicks.
When a user or group entry is missing but the passwd/group file exists it is not added by flatcar-tmpfiles and systemd-tmpfiles will then fail because it can't resolve the user or group. We only care about the fixed set of users like "core" because those are the ones that the user will normally customize and this is also enough to fix the bug because tmpfiles.d/baselayout-home.conf is the only place where not "root" is used but another user which is "core". Always copy the missing entries (from the fixed list of entries to be copied) over to the database under /etc/, regardless if it exists or not.
ad658ee to
17d2473
Compare
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Jan 20, 2023
This pulls in flatcar/baselayout#26 to fix the regression in Alpha/Beta (itself a fix for another regression) where systemd-tmpfiles bailed if /etc/passwd|group didn't have the core user, now solved by always copying missing entries over to the databases, not only if the files didn't exist.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Jan 20, 2023
This pulls in flatcar/baselayout#26 to fix the regression in Alpha/Beta (itself a fix for another regression) where systemd-tmpfiles bailed if /etc/passwd|group didn't have the core user, now solved by always copying missing entries over to the databases, not only if the files didn't exist.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Jan 20, 2023
This pulls in flatcar/baselayout#26 to fix the regression in Alpha/Beta (itself a fix for another regression) where systemd-tmpfiles bailed if /etc/passwd|group didn't have the core user, now solved by always copying missing entries over to the databases, not only if the files didn't exist.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Jan 20, 2023
This pulls in flatcar/baselayout#26 to fix the regression in Alpha/Beta (itself a fix for another regression) where systemd-tmpfiles bailed if /etc/passwd|group didn't have the core user, now solved by always copying missing entries over to the databases, not only if the files didn't exist.
t-lo
pushed a commit
to flatcar/scripts
that referenced
this pull request
Apr 17, 2023
This pulls in flatcar/baselayout#26 to fix the regression in Alpha/Beta (itself a fix for another regression) where systemd-tmpfiles bailed if /etc/passwd|group didn't have the core user, now solved by always copying missing entries over to the databases, not only if the files didn't exist.
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.
When a user or group entry is missing but the passwd/group file exists it is not added by flatcar-tmpfiles and systemd-tmpfiles will then fail because it can't resolve the user or group. We only care about the fixed set of users like "core" because those are the ones that the user will normally customize and this is also enough to fix the bug because tmpfiles.d/baselayout-home.conf is the only place where not "root" is used but another user which is "core".
Always copy the missing entries (from the fixed list of entries to be copied) over to the database under /etc/, regardless if it exists or not.
How to use
Should be backported to Beta/Alpha to fix flatcar/Flatcar#946 (comment)
Testing done
In CI plus manually with the provided image from flatcar/Flatcar#946 through
sudo flatcar-update -P flatcar_test_update.gz -D -V 9999.9.9and also with the following test cases:coreuser with a different comment/name and rerunningcoregroup and rerunning