Skip to content

Commit

Permalink
05core/*: display Ignition warnings on the console
Browse files Browse the repository at this point in the history
Fixes coreos/fedora-coreos-tracker#1125

This change displays all Ignition warnings on the console. Also, renamed
the existing Ignition service to make it more generalized for handling
status information about the Ignition run.
  • Loading branch information
sohankunkerkar committed Apr 6, 2022
1 parent 497819c commit 6dc91d2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ enable bootupd.socket
# Ideally it should have been added as part of base Fedora - but since it was arch specific, it was not added: https://bugzilla.redhat.com/show_bug.cgi?id=1433859
enable rtas_errd.service
enable clevis-luks-askpass.path
# Provide information if no ignition is provided
enable coreos-check-ignition-config.service
# Provide status information about the Ignition run
enable coreos-ignition-write-issues.service

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This service writes issue files describing status
# information about the Ignition run, which includes
# Ignition warnings and information if no Ignition
# config is provided.
[Unit]
Description=Create Ignition Status Issue Files
Before=systemd-user-sessions.service
ConditionPathExists=/etc/.ignition-result.json

[Service]
Type=oneshot
ExecStart=/usr/libexec/coreos-ignition-write-issues
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ behavior may occur. Ignition is not designed to run more than once per system.
${RESET}
EOF
fi
# This is for displaying Ignition warnings on the console
# TODO: find a way to query journal entries recorded before the system switches to real root
journalctl -t ignition -o cat -p warning | while read line; do
echo "Ignition: $line" >> /etc/issue.d/30_coreos_ignition_warnings.issue
done
else
nreboots=$(($(journalctl --list-boots | wc -l) - 1))
[ "${nreboots}" -eq 1 ] && boot="boot" || boot="boots"
Expand Down

0 comments on commit 6dc91d2

Please sign in to comment.