-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flatcar-tmpfiles: Always copy missing entries over to the database #26
Merged
Conversation
This file contains 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
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.
pothos
force-pushed
the
kai/populate-always
branch
from
January 18, 2023 17:10
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
pothos
force-pushed
the
kai/populate-always
branch
from
January 19, 2023 11:44
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
pothos
force-pushed
the
kai/populate-always
branch
from
January 20, 2023 10:18
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.
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.9
and also with the following test cases:core
user with a different comment/name and rerunningcore
group and rerunning