Description of problem: 2 logrotate tools beeing active on /var/log/foreman logfiles: /var/log/foreman seems to be cared for by 2 mechanisms: logrotate and a ruby mechanism, this looks like this: [root@rhel7-sat-61 foreman]# ll /var/log/foreman [...] -rw-r--r--. 1 foreman foreman 0 12月 13 03:50 production.20151211.log -rw-r--r--. 1 foreman foreman 40359 12月 13 03:50 production.20151211.log-20151213 -rw-rw-r--. 1 foreman foreman 86701 12月 17 07:07 production.log -rw-rw-r--. 1 foreman foreman 7196 12月 4 03:09 production.log-20151204.gz -rw-rw-r--. 1 foreman foreman 7303 12月 5 03:39 production.log-20151205.gz [...] Version-Release number of selected component (if applicable): current 6.1 How reproducible: always Steps to Reproduce: 1. ls -al /var/log/foreman Actual results: More than one mechanism is caring for the logfiles: ruby internal and "logrotate". Expected results: The ruby internal mechanism should be disabled. Additional info: - reported in upstream http://projects.theforeman.org/issues/13499
Foreman is using the default Rails logging infrastructure to log to "log/#{Rails.env}.log" (see /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application/configuration.rb). Rails is using the "logging" gem for that, as defined in /opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging.rb which says: appender = case dev when String ::Logging::Appenders::RollingFile.new(name, a_opts) else ::Logging::Appenders::IO.new(name, dev, a_opts) end (dev being the device/filename to log to). As we are passing "log/#{Rails.env}.log", logging uses the RollingFile appender, which is defined in "/opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/appenders/rolling_file.rb". While I cannot find where the configuration for this is done (nobody defines the "age" and "roll_by" params needed), the file-naming we see is exactly the one from RollingFile: @logname_fmt = "#{bn}.%Y%m%d#{ext}" and we also see a production.log.age file in /var/log/foreman.
Instead trying to fix file appenders, I think the proper solution is to finally configure Satellite 6 with syslog/journald. We are tracking this for some time already, recent changes in upstream allows this. Triage notes: Not yet implemented upstream, we are tracking this.
Additional note: To make this clear, the app is ready, we just need to configure it properly in the packages. Easy task, not sure if we can hit 6.2 tho.
Upstream bug component is Packaging
Moving 6.2 bugs out to sat-backlog.
*** This bug has been marked as a duplicate of bug 1163020 ***