Bug 1305013
Summary: | [RFE] Configure Satellite 6 Rails app with syslog by default | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Christian Horn <chorn> |
Component: | Packaging | Assignee: | satellite6-bugs <satellite6-bugs> |
Status: | CLOSED DUPLICATE | QA Contact: | Katello QA List <katello-qa-list> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1.4 | CC: | bbuckingham, ehelms, lzap, sthirugn, xdmoon |
Target Milestone: | Unspecified | Keywords: | FutureFeature, Triaged |
Target Release: | Unused | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://projects.theforeman.org/issues/13702 | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-12-19 09:12:04 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1296845 |
Description
Christian Horn
2016-02-05 10:30:16 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. 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 Upstream bug component is Packaging Moving 6.2 bugs out to sat-backlog. Upstream bug component is Packaging *** This bug has been marked as a duplicate of bug 1163020 *** |