overlay/core: write ignition issues to /run#4046
overlay/core: write ignition issues to /run#4046jbtrystram wants to merge 1 commit intocoreos:testing-develfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the coreos-ignition-write-issues script to write ignition issue files to /run/issue.d instead of /etc/issue.d. This change aligns with modern agetty behavior, which now sources issue files from /run. The changes in the script are correct and the removal of the workaround symlink is appropriate. However, a related test file has not been updated, which will cause CI to fail. Please see the specific comment for details.
34319dc to
e521f1a
Compare
|
So this will break on all the RHCOS versions we currently build because |
e521f1a to
9f96233
Compare
Since util-linux 2.41[1] agetty will source issues from multiples places by default (` /etc`, `/run/` and `/usr/lib`). Systemd also worked around [2] this since v258 which has been in fedora 43 for a while now, so let's always write our issues to `/run`. We add a check for RHEL to preserve the back-compatibility symlink. [1] util-linux/util-linux@508fb0e [2] systemd/systemd@864a5e9 Ref coreos/fedora-coreos-tracker#2108 See coreos/console-login-helper-messages#130
9f96233 to
c7aee76
Compare
|
/retest |
| # Until we have `util-linux-2.41` in RHCOS, we need to have the issues in /etc | ||
| source /etc/os-release | ||
| if [ "${ID}" == "rhel" ]; then | ||
| ln -sf /run/issue.d/30_coreos_ignition_*.issue /etc/issue.d/ | ||
| fi |
There was a problem hiding this comment.
I wonder if this would be better served as a conditional include in the rhel-coreos-config. I'd add it (with a nice comment explanation) and make it conditional on el9/el10 so that when we move to el11 it won't be applied.
Leaving it here would work too, but I'd really like to make it stop applying when we move to 11 so that it's easy for us to spot and remove this in the future.
There was a problem hiding this comment.
Ah yes, that would be better indeed!
There was a problem hiding this comment.
Alright so I bolied it down to a simple drop-in:
cat overlay.d/05core/usr/lib/systemd/system/coreos-ignition-write-issues.service.d/rhel-issue-compat-symlinks.conf
# Until RHEL 11 util-linux won't source issue files from /run/issue.d/.
# Create symlinks from /etc pointing to /run/issue.d/ so agetty picks them up.
# This can be removed when we move to EL11
# See https://github.com/coreos/fedora-coreos-tracker/issues/2108
[Service]
ExecStartPost=/usr/bin/bash -c "mkdir -p /etc/issue.d && ln -sf /run/issue.d/30_coreos_ignition_*.issue /etc/issue.d/"
Now the question I have is how do we ship that in RHCOS. A separate overlay or a postprocess ?
There was a problem hiding this comment.
There are so many different ways to do this. I've thought of 2 or 3 just sitting here.
I'm thinking maybe a postprocess that doesn't actually check el9/10/11 but rather checks the util-linux rpm version and then creates the symlink based on that. i.e. the symlink gets created at compose time (in a postprocess) rather than as part of the systemd service run - or maybe that won't work for some reason?
Since util-linux 2.41[1] agetty will source issues from multiples places by default (
/etc,/run/and/usr/lib).Systemd also worked around [2] this since v258 which has been in fedora 43 for a while now, so let's always write our issues to
/run.[1]
util-linux/util-linux@508fb0e
[2] systemd/systemd@864a5e9
Ref coreos/fedora-coreos-tracker#2108
See coreos/console-login-helper-messages#130