Bug 1568674

Summary: [shared-storage-vol]: Dead lock between disable and enable of shared volume blaming itself
Product: [Community] GlusterFS Reporter: Sanju <srakonde>
Component: glusterdAssignee: Sanju <srakonde>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: mainlineCC: amukherj, atumball, bugs, rhinduja, rhs-bugs, storage-qa-internal
Target Milestone: ---Keywords: Reopened
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: 1567616 Environment:
Last Closed: 2019-07-18 07:48:34 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:    
Bug Blocks: 1567616    

Comment 1 Worker Ant 2018-04-18 05:26:47 UTC
REVIEW: https://review.gluster.org/19897 (glusterd: Fix to set enable-shared-storage option) posted (#1) for review on master by Sanju Rakonde

Comment 2 Sanju 2019-07-18 07:48:34 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 ~]#


at https://review.gluster.org/19897 we have decided to not fix this issue as it is breaking some existing functionalities. So, I'm closing this bug as won't fix.

Thanks,
Sanju