Skip to content

overlay/core: write ignition issues to /run#4046

Open
jbtrystram wants to merge 1 commit intocoreos:testing-develfrom
jbtrystram:write-issues-to-run
Open

overlay/core: write ignition issues to /run#4046
jbtrystram wants to merge 1 commit intocoreos:testing-develfrom
jbtrystram:write-issues-to-run

Conversation

@jbtrystram
Copy link
Member

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

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jbtrystram jbtrystram force-pushed the write-issues-to-run branch from 34319dc to e521f1a Compare March 6, 2026 11:05
@jbtrystram
Copy link
Member Author

So this will break on all the RHCOS versions we currently build because util-linux and systemd are both too old there.
I'll add back the symlink under a rhel condition.

@jbtrystram jbtrystram force-pushed the write-issues-to-run branch from e521f1a to 9f96233 Compare March 6, 2026 11:15
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
@jbtrystram jbtrystram force-pushed the write-issues-to-run branch from 9f96233 to c7aee76 Compare March 6, 2026 15:26
@jbtrystram
Copy link
Member Author

/retest

Comment on lines +69 to +73
# 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, that would be better indeed!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants