Podman Container's ctr.log uses all disk space
Overview of the Issue
This issue occurs in the following circumstances:
- The vFunction organization deploys the vFunction Server using Podman
- Unexpectedly, the vFunction Server UI becomes unresponsive
- In an SSH session, the disk space where the vFunction Server is installed appears to be out of disk space
- Further analysis through
du -shx *
shows that one Container’s ctr.log is using an unexpectedly high amount of disk space:
NOTE: Podman uses the ctr.log as the Container’s Console Output of stdout and stderr. This is all of the output from “podman logs $CONTAINER_ID”
ls -l /vfunction/storage/overlay-containers/$UUID/userdata
-rw-------. $user $group 31916769280 Sep 30 04:09 ctr.log
Steps to Resolve the Issue
This issue can be resolved by clearing out the log file, setting the size limit to a smaller value, and running the vFunction Server upgrade:
- SSH to the vFunction Server VM
- Navigate to the directory with the large ctr.log
- Overwrite the existing log file:
echo "" > ctr.log
- Modify the Max Log Size value:
vi $HOME/.config/containers/containers.conf
### Add the lines below to this file to set the max size to 25mb
[containers]
max_log_size=26214400
- Run the vFunction Server Upgrade:
bash $BASE_DIR/vfunction/opt/vfunction/server-installation/upgrade.sh