Skip to content

Long lines will be splitted when journald logs #335

@xeor

Description

@xeor

In

conmon/src/ctr_logging.c

Lines 320 to 322 in 2b08734

/* per docker journald logging format, CONTAINER_PARTIAL_MESSAGE is set to true if it's partial, but otherwise not set. */
if (partial && writev_buffer_append_segment(dev_null, &bufv, "CONTAINER_PARTIAL_MESSAGE=true", PARTIAL_MESSAGE_EQ_LEN) < 0)
return -1;
, CONTAINER_PARTIAL_MESSAGE is set static to true. I find no way to turn this off.

This can be problematic example when using ansible tower/awx, which uses conmon/podman to start jobs inside containers running its job since those jobs often contains a bunch of json from ansible. You will end up with a splitted message in journald, which is not even in order..

If you send journald messages to another system as well, you will have no way of putting it together, and it will often break parsing and cause all sorts of problems since there are unbalanced quotes per line.

There should be a way to log without setting CONTAINER_PARTIAL_MESSAGE to true

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions