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

Add cron worker with journalctl cleaner #2790

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

patrickelectric
Copy link
Member

Helps #2328

@patrickelectric patrickelectric marked this pull request as draft July 5, 2024 18:12
@Williangalvani
Copy link
Member

should we use a script instead? we need something to cleanup the autopilot and mavlink logs from time to time, too 🤔

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
@patrickelectric
Copy link
Member Author

should we use a script instead? we need something to cleanup the autopilot and mavlink logs from time to time, too 🤔

what you mean by script ?

@Williangalvani
Copy link
Member

what you mean by script ?

never mind, if we have cron working, we can just had other entries for cleaning different things

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
@patrickelectric
Copy link
Member Author

what you mean by script ?

never mind, if we have cron working, we can just had other entries for cleaning different things

yes, that the plan

@patrickelectric patrickelectric marked this pull request as ready for review July 6, 2024 02:18
Copy link
Member

@joaoantoniocardoso joaoantoniocardoso left a comment

Choose a reason for hiding this comment

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

The idea of adding a cron is interesting for our system, however, journalctl is a log manager that doesn't require user intervention: it has configurations like (1) log size, (2) free disk size, (3) rate limit, (4) compression, and it will vacuum automatically.

https://www.freedesktop.org/software/systemd/man/latest/journald.conf.html

@patrickelectric
Copy link
Member Author

What is better, calling journalctl configuration command or working on journalctl configuration file/parameters, dealing with user custom configuration and identifying (based in the OS), which of the following files to change ?
/etc/systemd/journald.conf
/run/systemd/journald.conf
/usr/local/lib/systemd/journald.conf
/usr/lib/systemd/journald.conf
/etc/systemd/journald.conf.d/.conf
/run/systemd/journald.conf.d/
.conf
/usr/local/lib/systemd/journald.conf.d/*.conf

@patrickelectric
Copy link
Member Author

To me it adds extra complexity at the moment, what is the problem of the current approach ?

@joaoantoniocardoso
Copy link
Member

To me it adds extra complexity at the moment, what is the problem of the current approach ?

(1) we are taking power from the administrator, and (2) we are reinventing the wheel instead of configuring a basic system tool.

What I recommend is that when installing the system, we should overwrite (with a backup) /etc/systemd/journald.conf, print a message about it, and if the administrator wants a different configuration from our default, he can just change the configs there after installing it.

@patrickelectric
Copy link
Member Author

To me it adds extra complexity at the moment, what is the problem of the current approach ?

(1) we are taking power from the administrator, and (2) we are reinventing the wheel instead of configuring a basic system tool.

What I recommend is that when installing the system, we should overwrite (with a backup) /etc/systemd/journald.conf, print a message about it, and if the administrator wants a different configuration from our default, he can just change the configs there after installing it.

Installation does not fix the problem for current BlueOS systems.

@joaoantoniocardoso
Copy link
Member

To me it adds extra complexity at the moment, what is the problem of the current approach ?

(1) we are taking power from the administrator, and (2) we are reinventing the wheel instead of configuring a basic system tool.
What I recommend is that when installing the system, we should overwrite (with a backup) /etc/systemd/journald.conf, print a message about it, and if the administrator wants a different configuration from our default, he can just change the configs there after installing it.

Installation does not fix the problem for current BlueOS systems.

Can't we install it if the file doesn't exist?

@patrickelectric
Copy link
Member Author

To me it adds extra complexity at the moment, what is the problem of the current approach ?

(1) we are taking power from the administrator, and (2) we are reinventing the wheel instead of configuring a basic system tool.
What I recommend is that when installing the system, we should overwrite (with a backup) /etc/systemd/journald.conf, print a message about it, and if the administrator wants a different configuration from our default, he can just change the configs there after installing it.

Installation does not fix the problem for current BlueOS systems.

Can't we install it if the file doesn't exist?

By default this file comes from the OS.

@patrickelectric
Copy link
Member Author

I'm working in an alternative solution.

@patrickelectric patrickelectric marked this pull request as draft July 9, 2024 15:48
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.

3 participants