Description of problem: Since latest stable spacewalk installs osad with logrotate /etc/logrotate.d/osad: /var/log/osad { weekly rotate 5 copytruncate compress notifempty missingok size 100M } Logrotate ignores /var/log/osad rotating logs, because of bad file mode: # ll /var/log/osad* -rw------- 1 root root 2376628 10. Jun 23:00 /var/log/osad Logrotate awaits /var/log/osad having mode 0644 or 0444 and user:group root:root. I can indeed add a line "create 0600 root root" but this does not help. Logrotate will further ignore the file with the very same message. Version-Release number of selected component (if applicable): osa-common-5.11.74-1.el7.noarch osad-5.11.74-1.el7.noarch logrotate-3.8.6-15.el7.x86_64 How reproducible: Always on various systems Steps to Reproduce: 1. Install latest stable osad, logrotate 2. Start osad, wait for logrotate to rotate osad logs Actual results: Logrotate does not rotate logs because of bad file mode 0600. It wants 0644 or 0444 Expected results: Logrotate rotating osad logs Additional info: Since logrotate with line "create 0644 root root" must work, but does not, it may be a bug within logrotate, not osad. But at least, osad supplied /etc/logrotate.d/osad should hold a line "create 0600 root root". This is missing from the supplied file.
Found the same within Spacewalk 2.8. But not within Spacewalk 2.6.
This failure is already in 2.6 and 2.7. That filemodeerror refers not the Logfile, it refers the configuration for the logrotate. Fix: change filemodeerror from /etc/logrotate.d/osad to 0644 or 0444
copy paste failure. Fix: change filemode from /etc/logrotate.d/osad to 0644 or 0444
Hello, can you please paste exact version of osad you're using? (rpm -q osad) With osad-5.11.102-1.el6 I am having following file mode for /etc/logrotate.d/osad -rw-r--r--. 1 root root 115 Mar 20 06:59 /etc/logrotate.d/osad Which seems OK to me.
I've installed it fresh from 2.7 releases: [root@7b68f4e74bec /]# ll /etc/logrotate.d/ total 12 -rw-rw-r-- 1 root root 115 Aug 10 2017 osad -rw-r--r-- 1 root root 32 Aug 9 2017 up2date -rw-r--r--. 1 root root 100 Jan 30 13:51 yum [root@7b68f4e74bec /]# rpm -qa osad osad-5.11.89-1.el7.noarch [root@7b68f4e74bec /]# logrotate -f /etc/logrotate.conf error: Ignoring osad because of bad file mode - must be 0644 or 0444. [root@7b68f4e74bec /]# from 2.6 releases(this is the version we actually using) [root@a2123f9557a0 /]# ll /etc/logrotate.d/ total 12 -rw-rw-r-- 1 root root 115 Nov 14 2016 osad -rw-r--r-- 1 root root 32 Nov 15 2016 up2date -rw-r--r--. 1 root root 100 Jan 30 13:51 yum [root@a2123f9557a0 /]# rpm -qa osad osad-5.11.74-1.el7.noarch
Fix submitted in PR 658 https://github.com/spacewalkproject/spacewalk/pull/658
spacewalk.git(master): b218ba9fd9eccf4f9b62aed91f48501f970a9974
Move Spacewalk 2.9 bugs ON_QA.
Spacewalk 2.9 has been released. https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes29
Logrotate awaits rights on configuration files 0644 or 0444. Spacewalk did not install them with these and only these rights.