Bug 1387165

Summary: corosync logs using incorrect subsystem name on PPC64LE
Product: Red Hat Enterprise Linux 7 Reporter: Christine Caulfield <ccaulfie>
Component: libqbAssignee: Christine Caulfield <ccaulfie>
Status: CLOSED ERRATA QA Contact: Chris Mackowski <cmackows>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.3CC: cluster-maint, cmackows, jfriesse, kgaillot, royoung
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libqb-1.0-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 18:00:14 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:

Description Christine Caulfield 2016-10-20 09:30:47 UTC
Description of problem:

Corosync log messages are tagged as YKD when then should be VOTEQ or TOTEM

Version-Release number of selected component (if applicable):
7.3

How reproducible:
Always

Steps to Reproduce:
1. Enable logging for corosync & start it

Actual results:
Many log messages are logged as [YKD  ] instead of [VOTEQ] or [TOTEM]

Expected results:
Log messages should have the correct subsystem tag

Additional info:
Oct 13 14:45:07 europa qarshd[87326]: Running cmdline: /usr/tests/sts-rhel7.3/gfs/bin/checkslab
Oct 13 14:45:13 europa corosync[72227]: [TOTEM ] A new membership (10.15.104.73:1168) was formed. Members left: 1
Oct 13 14:45:13 europa corosync[72227]: [TOTEM ] Failed to receive the leave message. failed: 1
Oct 13 14:45:13 europa crmd[72249]: warning: No reason to expect node 1 to be down
Oct 13 14:45:13 europa crmd[72249]:  notice: Stonith/shutdown of io not matched
Oct 13 14:45:13 europa crmd[72249]:  notice: State transition S_IDLE -> S_POLICY_ENGINE
Oct 13 14:45:14 europa corosync[72227]: [YKD   ] Members[1]: 2
Oct 13 14:45:14 europa stonith-ng[72245]:  notice: Node io state is now lost
Oct 13 14:45:14 europa corosync[72227]: [YKD   ] Completed service synchronization, ready to provide service.
Oct 13 14:45:14 europa kernel: dlm: closing connection to node 1
Oct 13 14:45:14 europa dlm_controld[72421]: 170957 fence request 1 pid 87332 nodedown time 1476387913 fence_all dlm_stonith

Comment 1 Christine Caulfield 2016-10-20 09:33:19 UTC
The patch for libqb is upstream

commit b40c499d7de6a9abca20aa1ad7917b5a99b0c208
Author: Christine Caulfield <ccaulfie>
Date:   Tue Oct 18 14:30:28 2016 +0100

    log: Don't overwrite valid tags
    
    If a tag of 0 is passed into the logger and an existing callsite
    is found with a non-zero tag, the don't overwrite the existing tag.
    
    Signed-off-by: Christine Caulfield <ccaulfie>

diff --git a/lib/log.c b/lib/log.c
index 5f8463a..f10321e 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -352,8 +352,10 @@ qb_log_callsite_get(const char *function,
                        _custom_filter_fn(cs);
                }
                pthread_rwlock_unlock(&_listlock);
-       } else if (cs->tags != tags) {
-               cs->tags = tags;
+       } else {
+               if (tags && cs->tags != tags) {
+                       cs->tags = tags;
+               }
                if (_custom_filter_fn) {
                        _custom_filter_fn(cs);
                }

Comment 6 errata-xmlrpc 2017-08-01 18:00:14 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-2017:1896