Page MenuHomeVyOS Platform

'show/monitor log container' fails when 'log-driver journald' enabled
Closed, ResolvedPublic

Description

Currently, the show log container and monitor log container commands do not work correctly when container's log-driver is set to journald.
While the container logs are being captured by journald, there is no mechanism in VyOS CLI to display these logs via the show or monitor commands.

Currently, when log-driver journald is configured for a container in VyOS, attempting to show or monitor the container's logs results in the following error:

Error: journald logging only enabled with systemd on linux: no support for this OS yet

This error occurs despite the container logs being successfully written to journald, as verified by journalctl -xeu <container_name>.service.

Details

Version
2025.05.21-0020-rolling
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

In this PR I have refactored the log driver code to allow it to be configured per container. In addition to k8s-file and journald, a none option was added to disable logging.

Personally I'd rather configure it globally instead for each container.
Also not that Podman 5 will change the default to journald.

Hi @nvollmar

I understand the preference for global configuration. While that approach can be simple and convenient.
However, I had a bad experience where a container started spamming logs because of network problems, and it filled up the whole disk (200GB) in just one hour. That broke many stuff on my VyOS.

In this PR the log-driver has default value k8s-file , so we don't need to set it for each container. Switching to journald by default sounds fine and reasonable.

but even with journald, VyOS doesn't seem to limit how much disk space those logs can use (such as set the SystemMaxUse/SystemKeepFree etc in journald.conf). So on a router that's running for a long time, we could still run out of disk space because of logs.

That's why I suggested log-driver none – so we can turn off logging for containers that are super noisy and prevent them from filling up the disk.

Sure, but leaving the option to configure it globally does not take away the option to configure it per container.

dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
Viacheslav moved this task from Need Triage to Completed on the VyOS Rolling board.