Bug 1567616

Summary: [shared-storage-vol]: Dead lock between disable and enable of shared volume blaming itself
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Rahul Hinduja <rhinduja>
Component: coreAssignee: Sanju <srakonde>
Status: CLOSED DUPLICATE QA Contact: Rahul Hinduja <rhinduja>
Severity: medium Docs Contact:
Priority: medium    
Version: rhgs-3.4CC: amukherj, pasik, rcyriac, rhinduja, rhs-bugs, srakonde, storage-qa-internal, sunkumar
Target Milestone: ---Keywords: Reopened, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
If we disable enable-shared-storage option when any one of the glusterd is down, disabling the shared storage operation will be success. But subsequent enable/disable of enable-shared-storage operations will fail. Work Around: gluster v delete gluster_shared_storage gluster v set all cluster.enable-shared-storage enable
Story Points: ---
Clone Of:
: 1568674 (view as bug list) Environment:
Last Closed: 2019-10-25 06:41:13 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: 1568674    
Bug Blocks: 1503143    

Description Rahul Hinduja 2018-04-15 14:19:35 UTC
Description of problem:
=======================

Consider a entry scenario where shared volume is enabled and mounted on all nodes of trusted servers. Now if any glusterd is down and shared volume is disabled, it returns success and any subsequent enable/disable blame it exists/non-exist respectively.


[root@dhcp41-226 ~]# gluster volume set all cluster.enable-shared-storage enable
volume set: failed: Shared storage volume(gluster_shared_storage) already exists.
[root@dhcp41-226 ~]# gluster volume set all cluster.enable-shared-storage disable
Disabling cluster.enable-shared-storage will delete the shared storage volume(gluster_shared_storage), which is used by snapshot scheduler, geo-replication and NFS-Ganesha. Do you still want to continue? (y/n) y
volume set: failed: Shared storage volume does not exist. Please enable shared storage for creating shared storage volume.
[root@dhcp41-226 ~]# gluster volume set all cluster.enable-shared-storage enable
volume set: failed: Shared storage volume(gluster_shared_storage) already exists.
[root@dhcp41-226 ~]# gluster volume set all cluster.enable-shared-storage disable
Disabling cluster.enable-shared-storage will delete the shared storage volume(gluster_shared_storage), which is used by snapshot scheduler, geo-replication and NFS-Ganesha. Do you still want to continue? (y/n) y
volume set: failed: Shared storage volume does not exist. Please enable shared storage for creating shared storage volume.
[root@dhcp41-226 ~]# 

No force option is available to come out of this dead loop. volume Stop/Start force also did not help. 

Workaround: 
[root@dhcp41-226 ~]# gluster volume stop gluster_shared_storage force
Stopping the shared storage volume(gluster_shared_storage), will affect features like snapshot scheduler, geo-replication and NFS-Ganesha. Do you still want to continue? (y/n) y
volume stop: gluster_shared_storage: success
[root@dhcp41-226 ~]# gluster volume delete gluster_shared_storage
Deleting the shared storage volume(gluster_shared_storage), will affect features like snapshot scheduler, geo-replication and NFS-Ganesha. Do you still want to continue? (y/n) y
volume delete: gluster_shared_storage: success
[root@dhcp41-226 ~]# gluster volume set all cluster.enable-shared-storage enable
volume set: success
[root@dhcp41-226 ~]#

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

glusterfs-server-3.12.2-7.el7rhgs.x86_64

How reproducible:
=================
2/2


Steps to Reproduce:
===================
1. Enable shared volume
2. Stop glusterd on one of the node
3. Disable shared volume (Shared volume disables successfully. )
4. Start glusterd on the node
5. Try enable/disable of shared volume. 

Actual results:
Enable complains that the shared volume exists and disable complains that the shared volume does not exist. For a user it is like a dead-lock where enable/disable doesnt work and doesnt mount the shared volume to local host.

Comment 2 Atin Mukherjee 2018-04-16 08:05:17 UTC

*** This bug has been marked as a duplicate of bug 1551688 ***

Comment 6 Atin Mukherjee 2018-04-18 11:37:16 UTC
upstream patch : https://review.gluster.org/#/c/19897/

Comment 13 Sanju 2019-10-25 06:41:13 UTC

*** This bug has been marked as a duplicate of bug 1551688 ***