Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1305013 - [RFE] Configure Satellite 6 Rails app with syslog by default
Summary: [RFE] Configure Satellite 6 Rails app with syslog by default
Keywords:
Status: CLOSED DUPLICATE of bug 1163020
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Packaging
Version: 6.1.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1296845
TreeView+ depends on / blocked
 
Reported: 2016-02-05 10:30 UTC by Christian Horn
Modified: 2019-12-16 05:21 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-19 09:12:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 13702 0 None None None 2016-04-26 17:00:53 UTC
Red Hat Knowledge Base (Solution) 2077723 0 None None None 2016-02-05 10:31:37 UTC

Description Christian Horn 2016-02-05 10:30:16 UTC
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

Comment 1 Christian Horn 2016-02-05 10:31:14 UTC
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.

Comment 3 Lukas Zapletal 2016-02-15 09:39:10 UTC
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 09:40:38 UTC
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 20:12:21 UTC
Upstream bug component is Packaging

Comment 7 Bryan Kearney 2016-08-02 20:12:21 UTC
Upstream bug component is Packaging

Comment 9 Bryan Kearney 2016-08-04 20:19:19 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 10 Bryan Kearney 2016-12-16 18:03:33 UTC
Upstream bug component is Packaging

Comment 11 Lukas Zapletal 2016-12-19 09:12:04 UTC

*** 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.