Skip to content
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

overlay/15fcos: coreos-check-ssh-keys: limit search to current boot #1373

Merged
merged 1 commit into from
Dec 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions overlay.d/15fcos/usr/libexec/coreos-check-ssh-keys
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@ main() {

# See https://github.com/coreos/ignition/pull/964 for the MESSAGE_ID
# source. It will track the authorized-ssh-keys entries in journald
# provided via Ignition.
# provided via Ignition. Limit journal output to the most recent boot
# so we don't get output from re-used /var/ partitions.
ignitionusers=$(
journalctl -o json-pretty MESSAGE_ID=225067b87bbd4a0cb6ab151f82fa364b | \
journalctl -b 0 -o json-pretty MESSAGE_ID=225067b87bbd4a0cb6ab151f82fa364b | \
jq -r '.MESSAGE' | \
xargs -I{} echo "Ignition: {}")

# See https://github.com/coreos/afterburn/pull/397 for the MESSAGE_ID
# source. It will track the authorized-ssh-keys entries in journald
# provided via Afterburn.
# provided via Afterburn.Limit journal output to the most recent boot
dustymabe marked this conversation as resolved.
Show resolved Hide resolved
# so we don't get output from re-used /var/ partitions.

afterburnusers=$(
journalctl -o json-pretty MESSAGE_ID=0f7d7a502f2d433caa1323440a6b4190 | \
journalctl -b 0 -o json-pretty MESSAGE_ID=0f7d7a502f2d433caa1323440a6b4190 | \
jq -r '.MESSAGE' | \
xargs -I{} echo "Afterburn: {}")

Expand Down