bitnami / containers

Bitnami container images
https://bitnami.com
Other
3.42k stars 4.88k forks source link

Missing logrotate from dokuwiki container #48607

Closed tchernobog closed 1 year ago

tchernobog commented 1 year ago

Name and Version

bitnami/dokuwiki:20230404.1.0-debian-11-r54

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. open the container
  2. command -v logrotate returns nothing
  3. files in /bitnami/dokuwiki/data/log/error keep growing in size
  4. wait for a couple of months
  5. run out of space in your attached volume :-(

What is the expected behavior?

. logrotate to be installed and present as per the official documentation

. /bitnami/dokuwiki/data/log/*/*.log files should be rotated

. we don't run out of space resulting in the service being unavailable for all users

What do you see instead?

Out of space:

/dev/disk/by-id/scsi-0Linode_Volume_pvc*******  10218772 10202388         0 100% /bitnami/dokuwiki

Additional information

Dokuwiki does not support out of the box logrotation: https://github.com/dokuwiki/dokuwiki/issues/3354

We need it therefore handled externally.

FraPazGal commented 1 year ago

Hello @tchernobog, as stated in the link to our documentation you shared, we only enable logrotate support for VMs and cloud images but not containers. IMO the containers use case is different from the VMs one, as having a non-fixed environment gives you the freedom to use external logs management tools like logstash or fluentd.

That said, if you prefer using logrotate inside the container, you could always extend our container image and include it in your custom one.

tchernobog commented 1 year ago

Thanks @FraPazGal for the clarification. I am however deploying this as part of https://artifacthub.io/packages/helm/bitnami/dokuwiki. Should I reopen this bug against the k8s helm chart repository?

github-actions[bot] commented 1 year ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

FraPazGal commented 1 year ago

I don't think that is necessary, as the bug is not really on our container image or chart but in the application itself. We do not include logrotate in the image because the upstream devs are still on the fence about how to solve the logs issue. In my opinion, Dokuwiki's devs should get offer an official response on this before we include a default solution to this on our side.

In the meantime, you can always modify our distributed image to include any custom additional packages that works for your use case.

tchernobog commented 1 year ago

@FraPazGal however this result in the image being unusable after a while since it likely runs out of space due to the log issue, which also opens an avenue for a DoS. Shouldn't this be considered a bug against the current container?

github-actions[bot] commented 1 year ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 1 year ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.