Hi, It is a good question as I have had my disk filled before too. I have removed the massive .json log file from /var/lib/docker/containers/*/* in the past after stopping the container and docker daemon but I would not suggest unless you were okay with having to re-deploy the pod as I have had mixed success.
I think we need to add some documentation to the K8s cluster build requirements to enable some sort of log rotation for the docker containers. I found this: https://kubernetes.io/docs/concepts/cluster-administration/logging/ Kubernetes currently is not responsible for rotating logs, but rather a deployment tool should set up a solution to address that. For example, in Kubernetes clusters, deployed by the kube-up.sh script, there is a logrotate<https://linux.die.net/man/8/logrotate> tool configured to run each hour By default, the docker daemon uses json-file as its logging driver and this thing comes out of the box with an unlimited size. https://docs.docker.com/config/containers/logging/json-file/#usage Try setting “--log-opt max-size=[SIZE]m” in your k8s nodes where docker is running to prevent this from happening again. Thanks, Mandeep From: <[email protected]> on behalf of "[email protected]" <[email protected]> Date: Wednesday, June 13, 2018 at 2:09 AM To: "[email protected]" <[email protected]> Subject: [onap-discuss] How to clear logs Hi, I was able to resolve an issue with an ONAP OOM Pod that resulted in a log file filling up 95% of the disk space. Now, what if I need to clear the logs of an ONAP OOM pod ? What is the correct process ? Thanks. Abdelmuhaimen Seaudi Orange Labs Egypt Email: [email protected]<mailto:[email protected]> Mobile: +2012 84644 733 _________________________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you. This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at https://www.amdocs.com/about/email-disclaimer <https://www.amdocs.com/about/email-disclaimer>
_______________________________________________ onap-discuss mailing list [email protected] https://lists.onap.org/mailman/listinfo/onap-discuss
