-
Notifications
You must be signed in to change notification settings - Fork 127
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
Podman log file max size limit not working #295
Comments
Can you do a |
Took a look at this and this might be a conmon issue because we are passing down the log max size to conmon correctly
And when I look at the size of the log file, it is bigger than the limit I set
@mheon wdyt? |
We're sending @haircommander PTAL |
A friendly reminder that this issue had no activity for 30 days. |
Ok I did have a moment to look at this. this is still an issue, and is definitely the fault of conmon. the time we take log size into account is incorrect. we currently first read the line length from an already read buffer, then check whether we would exceed by writing it, and rotate the buffer. The problem if we don't page out the actual output once we do so. Since we read 8192 bytes at a time (or fewer if we find a newline), the log length will always be between the max and max + 8192. I would consider this behavior buggy and worthy of fixing, though I can't currently commit to fixing it myself. I will move this to the conmon repo. |
Hi! Some progress? I can rotate log by myself but I think that "ugly hack" ;-) |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Upon setting a
log-size-max
as a general container config in/ect/containers/containers.conf
, podman does not respect this limit and exceeds it.I've tried this in 3 ways.
Steps to reproduce the issue:
First Way with general config
/ect/containers/containers.conf
with the following:Restart Containers with
podman restart {{container_id}}
Check if global configuration is set with:
ps -ef | grep conmon | grep log-size-max
Check if file(ctr.log) size exceeds the given limit
Second way with podman commands
Start container with
podman container run {{image}} --log-opt max-size=10mb
Check if file(ctr.log) size exceeds the given limit
With truncate
truncate -s 10K {{path_to_file}}
Describe the results you received:
Every time the log file exceed the given limit, however, sometimes it did turn lower size and removed some logging information, but it would go right back to exceeding the max size limit.
Describe the results you expected:
Hoped to see the file remaining under the given limit.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
AWS
The text was updated successfully, but these errors were encountered: