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

No logging or compaction enabled for logs in snap internal /var/log/ folders #653

Open
ethanmye-rs opened this issue Oct 18, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@ethanmye-rs
Copy link
Member

Steps to reproduce

  1. Setup charmed-postgresql, connect an application to generate data. Deploying the default landscape-scalable bundle would be a good way to start generating logs.

Expected behavior

I expect the internal /var/log/ folder to start compacting old logs and eventually rotating them. I would like charm or snap level config knobs to alter this behavior (ie rotate logs after x days, keep logging directory under x GB, etc).

Actual behavior

files just build up in var/log/.
image

image

Versions

Operating system: 22.04.5 LTS

Juju CLI: 3.5.4

Juju agent: 3.5.0

Charm revision: 429

LXD: 5.0.3

@ethanmye-rs ethanmye-rs added the bug Something isn't working label Oct 18, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/DPE-5703.

This message was autogenerated

@dragomirp
Copy link
Contributor

Hi, @ethanmye-rs, at the moment the charm configures Postgresql to write a log every minute for every day of the week which will be overwritten at the turn of the week. So the charm will keep only 7 days worth of logs. Size of the logs will be variable, since the rotation is based on time, and there will always be around ~10k files, one for every minute of the week,

@ethanmye-rs
Copy link
Member Author

Thanks Dragomir for the context. Would you consider making this configurable at the charm/snap level? While this might be a reasonable config for some workloads, it is not ideal for others.

@gustavosr98
Copy link

gustavosr98 commented Oct 22, 2024

@dragomirp is it possible to re-use / integrate with logrotated subordinate charm?

We typically use it for Openstack charms inside /var/log, but might be worth trying it for /var/snap...

@marceloneppel
Copy link
Member

Hi, @ethanmye-rs and @gustavosr98!

For that topic, I believe it's important to involve our PM here.

@7annaba3l, what's your thought about that?

@taurus-forever taurus-forever added enhancement New feature or request and removed bug Something isn't working labels Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants