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

fix(docker): set log rotation to avoid docker bugs #8269

Merged

Conversation

chairulakmal
Copy link
Contributor

Containers can generate a significant amount of logs, consuming disk space over time. Here I added configuration for maximum log file size (max-size) and the number of retained log files (max-file) in the logging driver options to control disk usage and prevent log files from growing indefinitely.

Motivation

What are the most important goals of the ticket or PR?

There is a possible docker bugs which causes no logs to be saved or printed in containers with significant amount of logs, for example 3 days of zebra initial sync.

Refs:

PR Author Checklist

Check before marking the PR as ready for review:

  • Will the PR name make sense to users?
  • Does the PR have a priority label?
  • Have you added or updated tests?
  • Is the documentation up to date?

If a checkbox isn't relevant to the PR, mark it as done.

Solution

Add logging options to docker-compose.yml to run zebra with ligthwalletd.

Testing

Manual testing done by running docker compose up again from the same directory.

Reviewer Checklist

Check before approving the PR:

  • Does the PR scope match the ticket?
  • Are there enough tests to make sure it works? Do the tests cover the PR motivation?
  • Are all the PR blockers dealt with?
    PR blockers can be dealt with in new tickets or PRs.

And check the PR Author checklist is complete.

Containers can generate a significant amount of logs,
consuming disk space over time. Here I added configuration
for maximum log file size (max-size) and the number of retained
log files (max-file) in the logging driver options
to control disk usage and prevent log files from
growing indefinitely.
@chairulakmal chairulakmal requested a review from a team as a code owner February 13, 2024 23:53
@chairulakmal chairulakmal requested review from upbqdn and removed request for a team February 13, 2024 23:53
@github-actions github-actions bot added the C-bug Category: This is a bug label Feb 13, 2024
@upbqdn upbqdn removed their request for review February 14, 2024 21:08
@mpguerra
Copy link
Contributor

Thank you for the PR! We will review this one next week.

Copy link
Member

@gustavovalverde gustavovalverde left a comment

Choose a reason for hiding this comment

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

LGTM!

Thank you for this!

@gustavovalverde gustavovalverde added A-devops Area: Pipelines, CI/CD and Dockerfiles C-enhancement Category: This is an improvement I-usability Zebra is hard to understand or use P-Medium ⚡ labels Feb 20, 2024
mergify bot added a commit that referenced this pull request Feb 20, 2024
@mergify mergify bot merged commit 6c0aa04 into ZcashFoundation:main Feb 20, 2024
100 checks passed
idky137 pushed a commit to idky137/zebra that referenced this pull request Feb 28, 2024
)

Containers can generate a significant amount of logs,
consuming disk space over time. Here I added configuration
for maximum log file size (max-size) and the number of retained
log files (max-file) in the logging driver options
to control disk usage and prevent log files from
growing indefinitely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles C-bug Category: This is a bug C-enhancement Category: This is an improvement I-usability Zebra is hard to understand or use P-Medium ⚡
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants