Description of problem:
Install CNS 3.6 on top of OCP 3.6/7 and use e.g. dynamic provisioning for pods.
Logs get created below:
/var/lib/origin/openshift.local.volumes/plugins/kubernetes.io/glusterfs/<vol-name>/*.log
but normal glusterfs log-rotation (which gets automatically deployed) just take the following paths into consideration:
-/var/log/glusterfs/*.log
Version-Release number of selected component (if applicable):
- OCP 3.7
- CNS 3.6
- glusterfs-3.8.4-54.el7rhgs.x86_64
How reproducible:
Steps to Reproduce:
1. Install OCP with CNS on top
2. use gluster volumes
3. see logs growing in /var/lib/origin/openshift.local.volumes/plugins/kubernetes.io/glusterfs/<vol-name>/*.log
Actual results:
logs never get rotated and fs usage grows, so manual interaction is needed
Expected results:
- we should add a rule automatically so that these logs get rotated
- and we should menation this in the documentation
Additional info:
possibly sth like
~~~
/var/lib/origin/openshift.local.volumes/plugins/kubernetes.io/glusterfs/*/*.log {
sharedscripts
weekly
rotate 52
missingok
compress
delaycompress
notifempty
postrotate
/usr/bin/killall -HUP glusterfs > /dev/null 2>&1 || true
/usr/bin/killall -HUP glusterd > /dev/null 2>&1 || true
endscript
~~~
seems to work, but I am pretty sure there are better solutions
- possibly someone can review my approach and make better suggestions so that I can file a kcs
Comment 2Raghavendra Talur
2018-02-20 04:41:26 UTC
Daniel,
Thanks for the bug, the path "/var/lib/origin/openshift.local.volumes/plugins/kubernetes.io/" belongs to openshift volume plugins and I believe it should be logrotated by openshift/origin. I will clone this bug so that we can track it.
Talur
Comment 3Raghavendra Talur
2018-02-20 08:10:33 UTC
Moving the bug to cns-deployment component. This will just be a tracker to the OCP bug that it depends on.
This ( how to do logrotate) can be documented for now, logs are in a common path for plugins. If this can be changed or not have to be discussed further and also may have to think about backward compatibility.
Bipin/Daniel, can anyone of you please help to create KCS and verify it in a CNS setup?