Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1142113 - As a user, I would like my Pulp logs to go to logical locations
As a user, I would like my Pulp logs to go to logical locations
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Pulp (Show other bugs)
6.0.4
Unspecified Unspecified
unspecified Severity medium (vote)
: Beta
: Unused
Assigned To: satellite6-bugs
Katello QA List
: Triaged
Depends On: 1145723
Blocks: sat6-pulp-future 1175448
  Show dependency treegraph
 
Reported: 2014-09-16 03:58 EDT by Stephen Benjamin
Modified: 2018-09-19 11:22 EDT (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1145723 (view as bug list)
Environment:
Last Closed: 2016-07-27 05:11:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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
Pulp Redmine 542 High CLOSED - CURRENTRELEASE As a user, I would like my Pulp logs to go to logical locations Never
Red Hat Product Errata RHBA-2016:1501 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 08:28:58 EDT

  None (edit)
Description Stephen Benjamin 2014-09-16 03:58:43 EDT
Description of problem:
/var/log/pulp is full of empty log files for pulp and the workers.  All logs go to /var/log/messages or the journal (on rhel 7). We should use /var/log/pulp instead.


Version-Release number of selected component (if applicable):
6.0.4 GA
Comment 1 RHEL Product and Program Management 2014-09-16 04:03:17 EDT
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.
Comment 3 Michael Hrivnak 2014-09-26 10:28:00 EDT
I don't think pulp upstream should use /var/log/pulp/. We are currently using the standard log facilities given to us by the OS, and we have an explanation for our logging approach here: 

https://pulp-user-guide.readthedocs.org/en/latest/troubleshooting.html#logging

As for the empty log files in /var/log/pulp, we are required by celery to have them. If there is an error during startup of a celery process, before it switches to the system log facility, it will log that error to its file in /var/log/pulp/.

All of that said, it could be appropriate for the downstream product to use a rsyslog rule to redirect log messages to a file. There have been multiple previous discussions about why pulp cannot do that upstream.

I suggest either closing this bug, or please provide a more detailed request.
Comment 4 Stephen Benjamin 2014-09-26 10:49:57 EDT
Why exactly are they required by celery? Certainly that must be fixable?  

My preference would be those files go away on rhel 7 and on el6, ship the rsyslog rule to use /var/log/pulp.

I don't think this should be closed at all, are those two things really impossible upstream?


I've seen lots of Satellite users confused by the presence of these empty log files.
Comment 5 Randy Barlow 2014-10-01 12:26:04 EDT
As is, Celery will not start without being given some place to log, and it does not support syslog by default. Believe it or not, it is important that we continue to have these log files as this is where startup errors will be logged. If Celery is unable to start Pulp, error messages about that will go to those files. This is very similar to Apache's error_log. If Apache cannot start Pulp, it will log to /var/log/httpd/{ssl_,}error_log.

Once Celery starts Pulp, Pulp will configure logging (i.e., redirect all logging to syslog).

I have two ideas to make this clearer to users:

1) We could rename the log files to include the word "startup". For example, reserved_resource_worker-0-startup.log or similar.

2) We may be able to inject one log statement to those log files just before configuring logging that says something like "initial startup successful, redirecting logs to syslog."

How does that sound?
Comment 6 Stephen Benjamin 2014-10-14 12:49:07 EDT
Yea, thanks, I think that would work. 1 and 2 together would resolve the issue.
Comment 7 Michael Hrivnak 2014-12-17 15:23:25 EST
The upstream bug is fixed against pulp 2.6.0, so it will be in sat 6.1.
Comment 9 pulp-infra@redhat.com 2015-04-23 12:40:11 EDT
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.
Comment 10 Bryan Kearney 2016-01-04 09:01:51 EST
Based on the comments above, moving this to POST. This can be verified against any Satellite 6.1.+ instance.
Comment 13 jcallaha 2016-04-04 16:39:03 EDT
Verified in Satellite 6.2 Beta Snap 6 Compose 1.
Comment 15 errata-xmlrpc 2016-07-27 05:11:19 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501

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