Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1679534

Summary: Logging to pcsd.log is broken
Product: Red Hat Enterprise Linux 7 Reporter: Tomas Jelinek <tojeline>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.6CC: aherr, cfeist, cluster-maint, idevat, mlisik, omular, tojeline
Target Milestone: rcKeywords: Regression, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.9.167-1.el7 Doc Type: Bug Fix
Doc Text:
Cause: User is running pcsd. Consequence: /var/log/pcsd/pcsd.log is missing most of the messages which should have been logged. Fix: Make pcsd write to pcsd.log synchronously. Result: pcsd.log contains all the logged messages.
Story Points: ---
Clone Of:
: 1683957 (view as bug list) Environment:
Last Closed: 2019-08-06 13:10:03 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: 1683957    
Attachments:
Description Flags
proposed fix none

Description Tomas Jelinek 2019-02-21 11:18:59 UTC
Description of problem:
After pcsd starts up and the startup sequence is logged, only incoming HTTP requests are logged. All the other log messages are buffered in memory and are logged at pcsd clean exit.


Version-Release number of selected component (if applicable):
pcs-0.9.165-6.el7


How reproducible:
always, easily


Steps to Reproduce:
Observer /var/log/pcsd/pcsd.log to see only incoming requests are logged.
Example: run 'pcs status pcsd' in a cluster and see what is being logged.


Actual results:
Only incoming requests are logged:
::ffff:192.168.122.161 - - [21/Feb/2019:12:14:18 +0100] "GET /remote/check_auth HTTP/1.1" 200 69 0.0088                                                                                                                                                                         
::ffff:192.168.122.161 - - [21/Feb/2019:12:14:18 +0100] "GET /remote/check_auth HTTP/1.1" 200 69 0.0089                                                                                                                                                                         
rh76-node1 - - [21/Feb/2019:12:14:18 CET] "GET /remote/check_auth HTTP/1.1" 200 69                                                                                                                                                                                              
- -> /remote/check_auth


Expected results:
Other messages are logged as well:
I, [2019-02-21T12:14:07.387480 #510]  INFO -- : Running: /usr/sbin/corosync-cmapctl totem.cluster_name
I, [2019-02-21T12:14:07.387528 #510]  INFO -- : CIB USER: hacluster, groups: 
I, [2019-02-21T12:14:07.396624 #510]  INFO -- : Return Value: 0
::ffff:192.168.122.151 - - [21/Feb/2019:12:14:07 +0100] "GET /remote/check_auth HTTP/1.1" 200 101 0.0108
::ffff:192.168.122.151 - - [21/Feb/2019:12:14:07 +0100] "GET /remote/check_auth HTTP/1.1" 200 101 0.0109
rh75-node1 - - [21/Feb/2019:12:14:07 CET] "GET /remote/check_auth HTTP/1.1" 200 101
- -> /remote/check_auth


Additional info:
This got broken upstream in version pcs-0.9.165.

Comment 3 Tomas Jelinek 2019-02-21 12:46:42 UTC
Created attachment 1537074 [details]
proposed fix

Comment 6 Ivan Devat 2019-03-21 10:00:08 UTC
After Fix:

[kid76 ~] $ rpm -q pcs
pcs-0.9.167-1.el7.x86_64

[kid76 ~] $ pcs cluster enable --all
kid76: Cluster Enabled
lion76: Cluster Enabled
mule76: Cluster Enabled

> watch logs (e.g. in another window)
> [kid76 ~] $ tail -f /var/log/pcsd/pcsd.log

I, [2019-03-20T09:24:49.755616 #3995]  INFO -- : Running: /usr/sbin/corosync-cmapctl totem.cluster_name
I, [2019-03-20T09:24:49.755659 #3995]  INFO -- : CIB USER: hacluster, groups:
I, [2019-03-20T09:24:49.763463 #3995]  INFO -- : Return Value: 0
I, [2019-03-20T09:24:49.764093 #3995]  INFO -- : Running: /usr/sbin/pcs cluster enable
I, [2019-03-20T09:24:49.764124 #3995]  INFO -- : CIB USER: hacluster, groups:
I, [2019-03-20T09:24:50.034100 #3995]  INFO -- : Return Value: 0
::ffff:192.168.122.41 - - [20/Mar/2019:09:24:50 +0100] "GET /remote/cluster_enable HTTP/1.1" 200 15 0.2793
::ffff:192.168.122.41 - - [20/Mar/2019:09:24:50 +0100] "GET /remote/cluster_enable HTTP/1.1" 200 15 0.2794
kid76 - - [20/Mar/2019:09:24:49 CET] "GET /remote/cluster_enable HTTP/1.1" 200 15
- -> /remote/cluster_enable

Comment 10 errata-xmlrpc 2019-08-06 13:10:03 UTC
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-2019:2244