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

🐛 system logs should persist reboot #597

Closed
Ognian opened this issue Dec 30, 2022 · 3 comments · Fixed by #1324
Closed

🐛 system logs should persist reboot #597

Ognian opened this issue Dec 30, 2022 · 3 comments · Fixed by #1324
Assignees
Labels
area/flavor bug Something isn't working

Comments

@Ognian
Copy link
Contributor

Ognian commented Dec 30, 2022

Kairos version:

NAME="kairos-opensuse"
VERSION="v1.4.0-k3sv1.26.0+k3s1"
ID="kairos"
ID_LIKE="kairos-opensuse"
VERSION_ID="v1.4.0-k3sv1.26.0+k3s1"
PRETTY_NAME="kairos-opensuse v1.4.0-k3sv1.26.0+k3s1"
ANSI_COLOR="0;32"
BUG_REPORT_URL="https://github.com/kairos-io/kairos/issues/new/choose"
HOME_URL="https://github.com/kairos-io/provider-kairos"
IMAGE_REPO="quay.io/kairos/kairos-opensuse"
IMAGE_LABEL="latest"
GITHUB_REPO="kairos-io/provider-kairos"
VARIANT="core"
FLAVOR="opensuse"
CPU architecture, OS, and Version:

Linux lp3dnode 5.14.21-150400.24.38-default #1 SMP PREEMPT_DYNAMIC Fri Dec 9 09:29:22 UTC 2022 (e9c5676) x86_64 x86_64 x86_64 GNU/Linux
Describe the bug

system logs should persist reboot
To Reproduce

use journalctl --since=yesterday to see entries from when you booted the machine

sudo reboot and journalctl --since=yesterday and you see only the newest entries, the previous ones where lost

Expected behavior

preserve logs so that if hardware events happen we have some info in the logs
Logs

Additional context

discussion

@Ognian Ognian added the bug Something isn't working label Dec 30, 2022
@mudler mudler removed their assignment Dec 30, 2022
@jimmykarily
Copy link
Contributor

Some info I found shows this is controlled by journald configuraiton. We may need to force the persistence of logs and also make sure the /var/log/journal directory exists and survives between reboots.

@mudler
Copy link
Member

mudler commented Jan 4, 2023

Some info I found shows this is controlled by journald configuraiton. We may need to force the persistence of logs and also make sure the /var/log/journal directory exists and survives between reboots.

/var/log/ should be already persistent: https://github.com/kairos-io/kairos/blob/master/overlay/files/system/oem/11_persistency.yaml#L28

@mudler mudler changed the title system logs should persist reboot 🐛 system logs should persist reboot Jan 4, 2023
@Itxaka
Copy link
Member

Itxaka commented Apr 19, 2023

This is valid due to the nature of systemd journalctl. Journal database is set to auto, which means that if there is no /var/log/journal dir then it will be stored under /run which is volatile.

This needs a small change to our default config files to assure that we create that dir explicitely if we are on systemd system!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/flavor bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants