Bug 1917286

Summary: Pcsd logs to system log by mistake
Product: Red Hat Enterprise Linux 8 Reporter: Tomas Jelinek <tojeline>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: high Docs Contact:
Priority: high    
Version: 8.3CC: cfeist, cluster-maint, idevat, mlisik, mmazoure, mpospisi, nhostako, nwahl, omular, tojeline
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: 8.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.10.8-1.el8 Doc Type: Bug Fix
Doc Text:
Cause: Pcsd is running. Consequence: Pcsd is logging both to its own log /var/log/pcsd/pcsd.log and system log (/var/log/messages). Fix: Fix a bug in logging system initialization in pcs / pcsd. Result: Pcsd is logging into its own log /var/log/pcsd/pcsd.log only.
Story Points: ---
Clone Of:
: 1919318 (view as bug list) Environment:
Last Closed: 2021-05-18 15:12:36 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: 1919318    
Attachments:
Description Flags
proposed fix none

Description Tomas Jelinek 2021-01-18 09:09:31 UTC
Description of problem:
Pcsd logs both to its own log /var/log/pcsd/pcsd.log and system log. This makes the logging duplicitous and clutters the system log.


Version-Release number of selected component (if applicable):
pcs-0.10.6-1.el8


How reproducible:
always, easily


Steps to Reproduce:
1. start pcsd
2. see that pcsd logs into system log - /var/log/messages


Actual results:
pcsd logs into system log and /var/log/pcsd/pcsd.log


Expected results:
pcsd logs into /var/log/pcsd/pcsd.log only


Additional info:
Reported upstream: https://lists.clusterlabs.org/pipermail/users/2020-December/028095.html

Comment 1 Tomas Jelinek 2021-01-18 09:14:22 UTC
Created attachment 1748400 [details]
proposed fix

Test: pcsd does not log to system log (/var/log/messages)

Comment 8 Miroslav Lisik 2021-02-01 16:44:50 UTC
Test:

[root@r8-node-01 ~]# rpm -q pcs
pcs-0.10.8-1.el8.x86_64

[root@r8-node-01 ~]# pcs cluster stop --all
r8-node-02: Stopping Cluster (pacemaker)...
r8-node-01: Stopping Cluster (pacemaker)...
r8-node-02: Stopping Cluster (corosync)...
r8-node-01: Stopping Cluster (corosync)...
[root@r8-node-01 ~]# pcs cluster start --all
r8-node-01: Starting Cluster...
r8-node-02: Starting Cluster...

[root@r8-node-01 ~]# tail -n 0 -f /var/log/messages | grep pcsd

No logs from pcsd.

Comment 9 Miroslav Lisik 2021-02-02 08:26:23 UTC
Test:

[root@r8-node-01 ~]# rpm -q pcs
pcs-0.10.8-1.el8.x86_64

[root@r8-node-01 ~]# pcs cluster stop --all
r8-node-02: Stopping Cluster (pacemaker)...
r8-node-01: Stopping Cluster (pacemaker)...
r8-node-02: Stopping Cluster (corosync)...
r8-node-01: Stopping Cluster (corosync)...
[root@r8-node-01 ~]# pcs cluster start --all
r8-node-01: Starting Cluster...
r8-node-02: Starting Cluster...

[root@r8-node-01 ~]# tail -n 0 -f /var/log/messages | grep pcsd

No logs from pcsd.

Comment 16 errata-xmlrpc 2021-05-18 15:12:36 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 (pcs bug fix and enhancement update), 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/RHEA-2021:1737