Logrotation problems renders puppet-master unusable?

Hi Guys,

We are testing Foreman (clean 1.7.2 installation on EL7) for 1 week now.
Today when I came at the office we
saw that all hosts where out of sync.

Although the puppet agents were running just fine I saw a lot of "debug and
html output" in the clients logs such as:
<h1 class="error_title">Web application could not be started

I checked out the foreman server and seems the problems started after a
logrotation (on sunday):

Feb 15 03:51:55 i-foreman puppet-master[160808]: failed to set mode 644 on
/var/log/puppet/http.log: Permission denied -
/var/log/puppet/http.log

Feb 15 03:51:55 i-foreman puppet-master[160808]:
(/File[/var/log/puppet/http.log]/mode) change from 0644 to 0640 failed:
failed to set mode 644 on /var/log/puppet/http.log: Permission denied -
/var/log/puppet/http.log
Feb 15 03:51:55 i-foreman puppet-master[160808]: Could not prepare for
execution: Got 1 failure(s) while initializing:
File[/var/log/puppet/http.log]: change from 0644 to 0640 failed: failed to
set mode 644 on /var/log/puppet/http.log: P
ermission denied - /var/log/puppet/http.log

The permission on file:
[EL7/INT] [root@i-foreman logrotate.d]$]ls -alZ /var/log/puppet/http.log
-rw-r-----. root puppet system_u:object_r:puppet_log_t:s0
/var/log/puppet/http.log

The logrote script tries to create a file with puppet:puppet but our
logfiles have root:puppet. Any advice what to do and could the failed
logrotation be the cause
of a problem with clients to get the catalogs?

Regards,
Gerwin

Can you pastebin the content of your logrotate config for this file?
It's probably just in need of a change of owner :slight_smile: