Bug 1305013 - [RFE] Configure Satellite 6 Rails app with syslog by default
[RFE] Configure Satellite 6 Rails app with syslog by default
Status: CLOSED DUPLICATE of bug 1163020
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Packaging (Show other bugs)
All Linux
medium Severity medium (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
Katello QA List
: FutureFeature, Triaged
Depends On:
Blocks: 1296845
  Show dependency treegraph
Reported: 2016-02-05 05:30 EST by Christian Horn
Modified: 2017-04-25 12:31 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-12-19 04:12:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 13702 None None None 2016-04-26 13:00 EDT
Red Hat Knowledge Base (Solution) 2077723 None None None 2016-02-05 05:31 EST

  None (edit)
Description Christian Horn 2016-02-05 05:30:16 EST
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:

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
Comment 1 Christian Horn 2016-02-05 05:31:14 EST
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)
            ::Logging::Appenders::IO.new(name, dev, a_opts)

(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.
Comment 3 Lukas Zapletal 2016-02-15 04:39:10 EST
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.
Comment 4 Lukas Zapletal 2016-02-15 04:40:38 EST
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.
Comment 6 Bryan Kearney 2016-07-26 16:12:21 EDT
Upstream bug component is Packaging
Comment 7 Bryan Kearney 2016-08-02 16:12:21 EDT
Upstream bug component is Packaging
Comment 9 Bryan Kearney 2016-08-04 16:19:19 EDT
Moving 6.2 bugs out to sat-backlog.
Comment 10 Bryan Kearney 2016-12-16 13:03:33 EST
Upstream bug component is Packaging
Comment 11 Lukas Zapletal 2016-12-19 04:12:04 EST

*** This bug has been marked as a duplicate of bug 1163020 ***

Note You need to log in before you can comment on or make changes to this bug.