-
Notifications
You must be signed in to change notification settings - Fork 17
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
journald archiving #84
Comments
Wow, that's... a really terrible choice. There's so much useful information from previous boots. You should definitely be overwriting that.
Huh, didn't know about namespaces, very neat. We should definitely try and use that if possible.
I guess this is primarily a log retention issue right, we could open up some switches for that like in https://unix.stackexchange.com/questions/709570/how-to-keep-systemd-journal-for-one-year/712085#712085 Or we make it easier to do something like |
I was very surprised to discover it, to say the least.
We can definitely work on it. Won't help for EL8, but newer Linuxes should eventually all have it.
Yeah. So I guess this (and namespaces) are more of a thing to address in the GTN? |
Wouldn't hurt to have a role for making the changes to journald.conf / setting up remote archiving. |
Log archiving is something that can be useful - for example, I tend to keep my Galaxy logs for a pretty long time so that I can go back and find old job errors, find the last time I saw particular error messages (or when they started), etc.
With supervisor you could configure log rotation and then use an external utility to archive old logs and prune the archive. With journald this is trickier - although journald rotates its storage, it's all one big journal file. Also, on EL (even EL8) the default journald configuration uses the tmpfs-mounted
/run/log
rather than/var/log
, so logs are lost on reboot.From a quick look I have two ideas of potential solutions:
Use journal namespaces. From
systemd-journald.service(8)
:If the Galaxy processes were in their own journald namespace then when you archive the rotated journals, you're only archiving the Galaxy logs.
Unfortunately this is a relatively new feature, not even EL8 has it.
Periodically export logs to text using e.g.
journalctl -u <whatever>.service --since yesterday --until today
for all the previous day's logs, and then archive those exports.This may be more of an Ansible/deployment issue than Gravity itself, but I figured I should capture it somewhere.
The text was updated successfully, but these errors were encountered: