Univention Bugzilla – Bug 38143
logrotate does not trigger UMC components to reopen their logfiles - 60_umc.08_logrotate.test fails
Last modified: 2016-11-03 17:41:09 CET
Created attachment 6787 [details] Fix 60_umc.08_logrotate.test 60_umc.08_logrotate.test fails from time to time: <http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-1/job/Autotest%20MultiEnv/SambaVersion=s4,Systemrolle=master/50/testReport/junit/60_umc/08_logrotate/test/> On my S4-Master-test-VM: 1st run succeeded 2nd run failed 3rd run failed Is is caused by # grep -n notifempty /etc/logrotate.d/univention-management-console 17: notifempty 28: notifempty As the server has not yet printed any output, logrotate finds an empty files and skips the rotation. Thus the server re-opens the same file again. Even after doing the following, the test still fails: # sed -i -e '/notifempty/d' /etc/logrotate.d/univention-management-console As signal processing happens asynchronously, that is the signaling process continues running before the signaled process had a chance to re-open its file. Thus the test fails from time to time without the attached patch, which does: 1. add more debugging 2. Use os.path.samestat() 3. Remove several @property as they might change from use to use. 4. Can probably run on all system roles only the UMC servers are required 5. Call logrotate only once +++ This bug was initially created as a clone of Bug #37317 +++
r59471 | Bug #38143 test: Fix 60_umc.08_logrotate.test
Failed once more: <http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-1/job/Autotest%20MultiEnv/SambaVersion=s3,Systemrolle=member/54/testReport/junit/60_umc/08_logrotate/test/> r59505 | Bug #38143 test: Fix 60_umc.08_logrotate.test Package: ucs-test Version: 5.0.140-9.1013.201503310856 Branch: ucs_4.0-0 Scope: errata4.0-1
Ok, looks good.