Bug 1384503

Summary: Setting ganesha.enable on a volume doesn't generate an event for cache-invalidation on
Product: Red Hat Gluster Storage Reporter: Shashank Raj <sraj>
Component: nfs-ganeshaAssignee: Kaleb KEITHLEY <kkeithle>
Status: CLOSED WONTFIX QA Contact: Shashank Raj <sraj>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.2CC: amukherj, jthottan, kkeithle, ndevos, rhs-bugs, sashinde, skoduri, storage-qa-internal
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-21 06:00:22 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:

Description Shashank Raj 2016-10-13 12:27:31 UTC
Description of problem:

Setting ganesha.enable on a volume doesn't generate an event for cache-invalidation on

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

[root@dhcp43-110 ~]# rpm -qa|grep glusterfs
glusterfs-client-xlators-3.8.4-2.el7rhgs.x86_64
glusterfs-fuse-3.8.4-2.el7rhgs.x86_64
glusterfs-ganesha-3.8.4-2.el7rhgs.x86_64
glusterfs-cli-3.8.4-2.el7rhgs.x86_64
glusterfs-3.8.4-2.el7rhgs.x86_64
glusterfs-server-3.8.4-2.el7rhgs.x86_64
glusterfs-events-3.8.4-2.el7rhgs.x86_64
glusterfs-libs-3.8.4-2.el7rhgs.x86_64
glusterfs-geo-replication-3.8.4-2.el7rhgs.x86_64
glusterfs-debuginfo-3.8.4-1.el7rhgs.x86_64
glusterfs-api-3.8.4-2.el7rhgs.x86_64

[root@dhcp43-110 ~]# rpm -qa|grep ganesha
nfs-ganesha-debuginfo-2.4.0-2.el7rhgs.x86_64
nfs-ganesha-2.4.0-2.el7rhgs.x86_64
glusterfs-ganesha-3.8.4-2.el7rhgs.x86_64
nfs-ganesha-gluster-2.4.0-2.el7rhgs.x86_64


How reproducible:

Always

Steps to Reproduce:
1. Create a ganesha cluster and setup eventing environment to check for generated events.

2. Create a volume and start it.

[root@dhcp43-110 ~]# gluster vol info testvolume
 
Volume Name: testvolume
Type: Distributed-Replicate
Volume ID: 2838cd5f-3cc5-4326-9b5e-ba64cd36a7c9
Status: Started
Snapshot Count: 0
Number of Bricks: 6 x 2 = 12
Transport-type: tcp
Bricks:
Brick1: 10.70.43.110:/bricks/brick0/b0
Brick2: 10.70.43.96:/bricks/brick0/b0
Brick3: 10.70.43.6:/bricks/brick0/b0
Brick4: 10.70.42.110:/bricks/brick0/b0
Brick5: 10.70.43.110:/bricks/brick1/b1
Brick6: 10.70.43.96:/bricks/brick1/b1
Brick7: 10.70.43.6:/bricks/brick1/b1
Brick8: 10.70.42.110:/bricks/brick1/b1
Brick9: 10.70.43.110:/bricks/brick2/b2
Brick10: 10.70.43.96:/bricks/brick2/b2
Brick11: 10.70.43.6:/bricks/brick2/b2
Brick12: 10.70.42.110:/bricks/brick2/b2
Options Reconfigured:
transport.address-family: inet
performance.readdir-ahead: on
nfs.disable: on
cluster.enable-shared-storage: enable
nfs-ganesha: enable


3.Enable ganesha on the volume. 

[root@dhcp43-110 ~]# gluster vol set testvolume ganesha.enable on
volume set: success

[root@dhcp43-110 ~]# gluster vol info testvolume
 
Volume Name: testvolume
Type: Distributed-Replicate
Volume ID: 2838cd5f-3cc5-4326-9b5e-ba64cd36a7c9
Status: Started
Snapshot Count: 0
Number of Bricks: 6 x 2 = 12
Transport-type: tcp
Bricks:
Brick1: 10.70.43.110:/bricks/brick0/b0
Brick2: 10.70.43.96:/bricks/brick0/b0
Brick3: 10.70.43.6:/bricks/brick0/b0
Brick4: 10.70.42.110:/bricks/brick0/b0
Brick5: 10.70.43.110:/bricks/brick1/b1
Brick6: 10.70.43.96:/bricks/brick1/b1
Brick7: 10.70.43.6:/bricks/brick1/b1
Brick8: 10.70.42.110:/bricks/brick1/b1
Brick9: 10.70.43.110:/bricks/brick2/b2
Brick10: 10.70.43.96:/bricks/brick2/b2
Brick11: 10.70.43.6:/bricks/brick2/b2
Brick12: 10.70.42.110:/bricks/brick2/b2
Options Reconfigured:
ganesha.enable: on
features.cache-invalidation: on
transport.address-family: inet
performance.readdir-ahead: on
nfs.disable: on
cluster.enable-shared-storage: enable
nfs-ganesha: enable

4. Observe that it sets ganesha.enable and cache-invalidation as on for the volume, however we only see event getting generated for ganesha.enable and not for cache-invalidation.


{u'message': {u'name': u'testvolume', u'options': [[u'ganesha.enable', u'on']]}, u'event': u'VOLUME_SET', u'ts': 1476360622, u'nodeid': u'5de8f62d-8731-4382-9912-664f6a3d18b3'}


Actual results:

Setting ganesha.enable on a volume doesn't generate an event for cache-invalidation on

Expected results:

Since we internally set cache-invalidation as on whenever we enable ganesha on a volume, it is required to generate a event for that as well along with ganesha.enable.

Additional info:

Similar is the case for ganesha.enable off

whenever we set ganesha.enable off for a volume, we set cache-invalidation as off as well but we don't generate an event for that.

[root@dhcp43-110 ~]# gluster vol set testvolume ganesha.enable off
volume set: success

[root@dhcp43-110 ~]# gluster vol info testvolume
 
Volume Name: testvolume
Type: Distributed-Replicate
Volume ID: 2838cd5f-3cc5-4326-9b5e-ba64cd36a7c9
Status: Started
Snapshot Count: 0
Number of Bricks: 6 x 2 = 12
Transport-type: tcp
Bricks:
Brick1: 10.70.43.110:/bricks/brick0/b0
Brick2: 10.70.43.96:/bricks/brick0/b0
Brick3: 10.70.43.6:/bricks/brick0/b0
Brick4: 10.70.42.110:/bricks/brick0/b0
Brick5: 10.70.43.110:/bricks/brick1/b1
Brick6: 10.70.43.96:/bricks/brick1/b1
Brick7: 10.70.43.6:/bricks/brick1/b1
Brick8: 10.70.42.110:/bricks/brick1/b1
Brick9: 10.70.43.110:/bricks/brick2/b2
Brick10: 10.70.43.96:/bricks/brick2/b2
Brick11: 10.70.43.6:/bricks/brick2/b2
Brick12: 10.70.42.110:/bricks/brick2/b2
Options Reconfigured:
ganesha.enable: off
features.cache-invalidation: off
transport.address-family: inet
performance.readdir-ahead: on
nfs.disable: on
cluster.enable-shared-storage: enable
nfs-ganesha: enable
[root@dhcp43-110 ~]# 

event message:

{u'message': {u'name': u'testvolume', u'options': [[u'ganesha.enable', u'off']]}, u'event': u'VOLUME_SET', u'ts': 1476361410, u'nodeid': u'5de8f62d-8731-4382-9912-664f6a3d18b3'}