Bug 1763007
Summary: | --log-opt for podman run does not work as expected | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Suhaas Bhat <subhat> |
Component: | podman | Assignee: | Jindrich Novy <jnovy> |
Status: | CLOSED ERRATA | QA Contact: | Alex Jia <ajia> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 8.3 | CC: | bbaude, dornelas, dwalsh, fsayyed, gscrivan, jligon, jnovy, lsm5, mheon, mpatel, pehunt, pmoogi, tsweeney, umohnani, ypu |
Target Milestone: | rc | Keywords: | FutureFeature |
Target Release: | 8.4 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | podman-3.0 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-05-18 15:32:02 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1186913, 1823899 |
Description
Suhaas Bhat
2019-10-18 03:38:38 UTC
We appear to list max-file and max-size as being supported options here: https://github.com/containers/libpod/blob/v1.4.4/completions/bash/podman#L500 but they don't seem to be defined anywhere else. Podman supports a (limited) set of log drivers, but does not presently support setting options for these drivers. Are there any specific options that you want to use? We might be able to do something here, but realize that we don't have a long running daemon, unless conmon could handle this. I guess max-size and max-files would rename the existing log file to annother name and then start writing a new log file. Then if we had three renames, would remove the oldest. conmon has a --log-max-size option now. Oops typo above conmon --help ... --log-size-max Maximum size of log file My quick read of the code looks like conmon just truncates the file, I might have missed it, but I don't see it rename the previous version. As Red Hat Enterprise Linux 7 is now in its Maintenance Support 1 phase[1] no new software functionality is planned. We are moving this request to Red Hat Enterprise Linux 8 where it may be considered for inclusion in a future minor release. [1] https://access.redhat.com/support/policy/updates/errata#Maintenance_Support_1_Phase Assign an intern. Giuseppe could you look at this? Do we have supported this in the latest Podman version ? no, this is not supported yet This seems to work somewhat ./bin/podman run -d --log-opt max-size=1m alpine sleep 500 Which passes to conmon the --log-size-max 1000000 flag. I don't believe this is perfect, but it does satisfy the requirement. It works on podman-3.0.0-0.33rc2.module+el8.4.0+9742+44abad1f. [root@kvm-03-guest13 ~]# rpm -q podman podman-3.0.0-0.33rc2.module+el8.4.0+9742+44abad1f.x86_64 [root@kvm-03-guest13 ~]# podman run -d --log-opt max-size=1m alpine sleep 500 e02f18ec462ea0f8159ada5c706d83eba72782113fc87d009623aab64ebe9799 [root@kvm-03-guest13 ~]# podman inspect pedantic_shannon | grep -i max-size "max-size=1m", @subhat, please give a double check on k8s/OCP environment, thanks a lot! Also verified on podman-3.0.0-0.38rc2.module+el8.4.0+9804+5385893b.x86_64 w/ crun-0.17-1.module+el8.4.0+9804+5385893b.x86_64. # podman run -d --log-opt max-size=1m alpine sleep 500 24a2cc1fb81c482c2342d14d21ae8bab964e7321dfdec98961bf77316fafdbf2 # podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 24a2cc1fb81c alpine sleep 500 13 seconds ago Up 13 seconds ago sweet_elion # podman inspect sweet_elion | grep -i max-size "max-size=1m", Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: container-tools:rhel8 security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:1796 |