Skip to content

OTEL Collector docker image logrotator.sh does not truncate file #1330

@jezza323-kalibre

Description

@jezza323-kalibre

I am running the currently tagged image "docker.hyperdx.io/hyperdx/hyperdx-otel-collector:2" in a basic virtualised RHEL docker environment for testing purposes. The logrotator.sh is running as expected, and appears to copy the log to agent.log.1 successfully, and delete it, but the original log file never truncates. This eventually blows out the file size on the disk and kills things

The command

> "$LOG_FILE"

Has no impact on the file size of the log file, even when running "> agent.log" manually from a docker exec into the running container. Other options suggested by googling such as

truncate -s 0 agent.log

have the same effect (eg none).

Is anyone else experiencing this? or is this an environment issue? I can create new files and truncate those successfully. I can also rm agent.log successfully. Not sure what else to look at here...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions