Bug 1386492 - [Eventing]: Volume stop is not generating the BRICK_DISCONNECT events.
Summary: [Eventing]: Volume stop is not generating the BRICK_DISCONNECT events.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: glusterd
Version: rhgs-3.2
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Atin Mukherjee
QA Contact: Byreddy
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-19 05:49 UTC by Byreddy
Modified: 2016-10-19 07:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-19 07:36:15 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Byreddy 2016-10-19 05:49:34 UTC
Description of problem:
=======================
Volume stop is not generating the BRICK_DISCONNECT events for the volume bricks

It's generating single VOLUME_STOP event.

{u'message': {u'force': u'0', u'name': u'Dis'}, u'event': u'VOLUME_STOP', u'ts': 1476854938, u'nodeid': u'50687898-88b3-4157-9f13-1c32266f83be'}


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


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


Steps to Reproduce:
===================
1. Have 2 node cluster
2. Have simple distribute volume running with 3 bricks
3. Setup to capture the gluster operation events
4. Stop the running volume 

Actual results:
===============
Volume stop is not generating the BRICK_DISCONNECT events 


Expected results:
=================
Volume stop should generate the BRICK DISCONNECT events because this command will stop the running bricks.

Additional info:
================
For volume start,  we are getting the BRICK_CONNECT events, we need to get the reverse events when we stopped as well

Comment 2 Atin Mukherjee 2016-10-19 07:36:15 UTC
This is as per design. We generate brick disconnect *only* when a volume is in started state. volume stop event should be sufficient enough to pass on the message back to the upper layer indicating a change in the volume state.

<snippet>

                if (glusterd_is_brick_started (brickinfo)) // this is check I am talking about{                        
                        gf_msg (this->name, GF_LOG_INFO, 0,                         
                                GD_MSG_BRICK_DISCONNECTED,                          
                                "Brick %s:%s has disconnected from glusterd.",  
                                brickinfo->hostname, brickinfo->path);              
                        ret = get_volinfo_from_brickid (brickid, &volinfo);         
                        if (ret) {                                                  
                                gf_msg (this->name, GF_LOG_ERROR, 0,                
                                        GD_MSG_VOLINFO_GET_FAIL,                    
                                        "Failed to get volinfo from "               
                                        "brickid(%s)", brickid);                    
                                goto out;                                           
                        }                                                           
                        gf_event (EVENT_BRICK_DISCONNECTED,                         
                                  "peer=%s;volume=%s;brick=%s",                     
                                  brickinfo->hostname, volinfo->volname,            
                                  brickinfo->path);                                 
                }


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