feat: compress event log entries#18029
Conversation
2414b49 to
7b397aa
Compare
vrothberg
left a comment
There was a problem hiding this comment.
That's a really interesting idea, @matejvasek!
LGTM from my end but maybe I am missing some side effect.
@Luap99 @giuseppe @edsantiago @cevich WDYT?
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: matejvasek, vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Luap99
left a comment
There was a problem hiding this comment.
As per https://www.freedesktop.org/software/systemd/man/journald.conf.html#Options Compress should be yes by default which means journald will compress based on that configuration so I do not think podman should ignore this option. We should just let journald take care of it.
|
@Luap99 Yes, that's true, it is storing items above 512B compressed. This is more about transfer limits. |
|
But why does this work? Wouldn't journald try to compress the data twice then? I cannot find any documentation about the internal compression, how can we know that this is not going to break in the next systemd update? |
I think this very well may lead to double a compression. |
|
Would be good to hear from some journald expert. |
edsantiago
left a comment
There was a problem hiding this comment.
I'm uncomfortable with this PR, it seems to rely on just-so-happens-to-work behavior in journald and I'm incapable of understanding the use case. ISTM that the cost/benefit here is way skewed: high cost, high risk, for questionable benefit in rare corner cases. But I'll step out.
One concern inline.
@edsantiago TBH I am not particularly comfortable with this either. This is just another attempt to make sure long events work, although the SELinux fix by @rhatdan should be sufficient on it own. With regard to From application IF I was compressing data on write and read would be returning uncompressed that would be really effing scary, but that's not what happening. |
7b397aa to
8cd544e
Compare
The compressed fields: * PODMAN_LABELS * PODMAN_CONTAINER_INSPECT_DATA [NO TESTS NEEDED] [NO NEW TESTS NEEDED] Signed-off-by: Matej Vasek <mvasek@redhat.com>
8cd544e to
d40f225
Compare
Actually this is not true, my bad. 🤦♂️ In fact, the compressed fields are not displayed in output of Reason I am seeing them is that |
|
Regardless, if Dan's update of SELinux will work this PR is not needed. |
|
container-selinux should now be available with the fix for this issue. |
Compress event log entries
Compress labels and configuration inspect data that are longer that 1024 bytes.
The compressed fields:
PODMAN_LABELSPODMAN_CONTAINER_INSPECT_DATACompatibility notes
Output of
journalctlis still the same since it automatically decompresses these fields.Compression ratio example: