Bug 1386172

Summary: [Eventing]: UUID is showing zeros in the event message for the peer probe operation.
Product: Red Hat Gluster Storage Reporter: Byreddy <bsrirama>
Component: glusterdAssignee: Atin Mukherjee <amukherj>
Status: CLOSED ERRATA QA Contact: Byreddy <bsrirama>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.2CC: rhinduja, rhs-bugs, storage-qa-internal, vbellur
Target Milestone: ---   
Target Release: RHGS 3.2.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.8.4-3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1386516 (view as bug list) Environment:
Last Closed: 2017-03-23 06:11:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 1386516, 1387564    
Bug Blocks: 1351528    

Description Byreddy 2016-10-18 10:46:45 UTC
Description of problem:
=======================
UUID is showing zeros in the event message for the peer probe operation.

{u'message': {u'host': u'NODE_IP', u'uuid': u'00000000-0000-0000-0000-000000000000'}, u'event': u'PEER_CONNECT', u'ts': 1476787104, u'nodeid': u'50687898-88b3-4157-9f13-1c32266f83be'}

For complete event messages check the next comment 


Version-Release number of selected component (if applicable):
============================================================
glusterfs-3.8.4-2


How reproducible:
=================
Always


Steps to Reproduce:
===================
1. Have gluster events setup with two nodes
2. Do peer probe operation
3. Check the event message generated by the peer probe command

Actual results:
===============
UUID is showing zeros in the event message for the peer probe operation.



Expected results:
=================
It should show correct UUID in the event message.


Additional info:

Comment 3 Atin Mukherjee 2016-10-19 07:21:13 UTC
RCA:

When a new node is probed, on the first RPC_CLNT_CONNECT peerctx->uuid is set to NULL as the same is yet to be populated. However the subesquent (dis)connect events would be carrying the valid UUIDs.

The way to solve this issue is to conditionally populate UUIDs. If EVENT_PEER_CONNECT has to be generated for the first RPC_CLNT_CONNECT which is because of a peer probe trigger the event would only have hostname whereas for the rest of the other cases the event will populate uuid along with hostname.

Comment 4 Atin Mukherjee 2016-10-19 07:28:51 UTC
upstream mainline patch http://review.gluster.org/15678 posted for review.

Comment 5 Atin Mukherjee 2016-10-19 07:47:35 UTC
I got a suggestion in the patch saying let's not generate EVENT_PEER_CONNECT for a peer probe trigger which sounds right to me.

Comment 7 Atin Mukherjee 2016-10-24 08:06:24 UTC
upstream mainline : http://review.gluster.org/15678
upstream 3.9 : http://review.gluster.org/15697
downstream patch : https://code.engineering.redhat.com/gerrit/#/c/88006/

Comment 10 Byreddy 2016-10-26 09:23:03 UTC
This bug is verified using the 3.8.4-3 build.

I am seeing the correct uuid in the even message generated by peer probe command

{u'message': {u'host': u'NODE-IP2'}, u'event': u'PEER_ATTACH', u'ts': 1477473636, u'nodeid': u'da649f6a-6e15-4561-b624-b4342142faa8'}
NODE-IP1 - - [26/Oct/2016 14:45:49] "POST /listen HTTP/1.1" 200 -


Moving to verified state.

Comment 12 errata-xmlrpc 2017-03-23 06:11:51 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://rhn.redhat.com/errata/RHSA-2017-0486.html