Description of problem: If a user has a SAM instance that has been running for awhile (either 1 week or 2 weeks, not sure yet), proudction.log will not get rolled and will get stuck. Logs will look like this: ]# ls -ltrh /var/log/katello/production.log* -rw-r--r--. 1 root root 0 Nov 26 10:34 /var/log/katell/production.log.age -rw-r-----. 1 katello katello 88 Nov 26 10:38 /var/log/katello/production.log._copy_ -rw-r-----. 1 katello katello 0 Nov 26 10:38 /var/log/katello/production.log Note the zero-byte production.log Version-Release number of selected component (if applicable): sam 1.3 How reproducible: every time Steps to Reproduce: 1. set up sam 2. do something that causes output to production.log 3. wait for rotate to happen (1 week by default) 4. do something else to cause output to production.log Actual results: production.log will be zero-byte and will not get updates at this point. This makes it difficult to debug other issues, especially katello-debug output. Expected results: production.log gets rolled successfully Additional info: I suspect that when katello-configure runs, it creates a production.log.age file as root. However, katello runs as katello user, so it cannot clear out this file when performing a log rotation. Here is a way to repro without waiting a week: * set up SAM as usual, running katello-configure * edit /usr/share/katello/config/katello_defaults.yml, change "age: 'weekly'" to "age: 30", which will rotate every 30 sec * bounce katello * start up rails console as katello user (sudo su - katello -s /bin/bash, then start console) * Rails.logger.warn("foo") * wait 30+ sec for log to rotate * Rails.logger.warn("foofoo") * quit console * check production.log, foofoo message will not appear This command appears to work around the issue: chown katello.katello /var/log/katello/production.log.age
KCS solution in Knowledgebase: https://access.redhat.com/site/solutions/633103
closing out older bug, any new implementation would very likely not hit this. I am marking as closed/wontfix, but feel free to re-open if needed.