Bug 1389168 - glusterd: Display proper error message and fail the command if S32gluster_enable_shared_storage.sh hook script is not present during gluster volume set all cluster.enable-shared-storage <enable/disable> command
Summary: glusterd: Display proper error message and fail the command if S32gluster_ena...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: rhgs-3.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: RHGS 3.2.0
Assignee: Avra Sengupta
QA Contact: Byreddy
URL:
Whiteboard:
Depends On: 1377448
Blocks: 1351528 1388348 1389197
TreeView+ depends on / blocked
 
Reported: 2016-10-27 05:52 UTC by Bipin Kunal
Modified: 2019-12-16 07:14 UTC (History)
8 users (show)

Fixed In Version: glusterfs-3.8.4-4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1377448
Environment:
Last Closed: 2017-03-23 06:15:21 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0486 0 normal SHIPPED_LIVE Moderate: Red Hat Gluster Storage 3.2.0 security, bug fix, and enhancement update 2017-03-23 09:18:45 UTC

Description Bipin Kunal 2016-10-27 05:52:27 UTC
+++ This bug was initially created as a clone of Bug #1377448 +++

Description of problem:


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

How reproducible: Always


Steps to Reproduce:
1. Run command: "gluster volume set all cluster.enable-shared-storage enable"

Actual results:
1. The running Volume now lists "cluster.enable-shared-storage: enable"
a. The command returned success.
2. However the shared volume was not created.

Expected results:
1. When the command fails, a failure return code is expected.
a. With a relevant description.
2. It is expected that the command will create the shared volume.

Additional info:

OS: Debian Jessie

1. Rebooting did not help.
2. Rebuilding the clustered data volume did not help.
3. Clearing files in /var/run/gluster did not help. 
4. Logs lack error messages except:
   readv on /var/run/gluster/d373e2b2e599fb58e944558312eb1ae5.socket failed (Invalid argument)

--- Additional comment from Avra Sengupta on 2016-10-21 05:57:32 EDT ---

Was the hook script /var/lib/glusterd/hooks/1/set/post/S32gluster_enable_shared_storage.sh present at the time this was seen. Hook scripts get deleted when we clean up /var/lib/glusterd, and need to be installed again.

--- Additional comment from Jay Flory on 2016-10-23 11:38:06 EDT ---

1. At this point I am not able to tell if it was installed.
a. I have long since moved on and installed by other means.
2. Where is this documented about the scripts?
3. If the scripts are missing but needed, the command should fail and specifically state that the scripts are missing.
a. The command should not fail but report success.

--- Additional comment from Avra Sengupta on 2016-10-24 04:55:18 EDT ---

I agree, maybe we can edit the summary of this bug to reflect the same, and make the necessary changes so that the command fails with the appropriate message.

--- Additional comment from Avra Sengupta on 2016-10-25 02:46:39 EDT ---

Based on comment #3, updating the summary of the bug.

Comment 2 Avra Sengupta 2016-10-27 07:31:51 UTC
Patch merged in master

Comment 4 Atin Mukherjee 2016-11-07 05:23:21 UTC
Avra - please backport the patch to downstream now.

Comment 8 Byreddy 2016-11-14 05:35:59 UTC
Verified this bug using the build - glusterfs-3.8.4-5

CLI failed with proper error message When tried to enable shared storage when hoot script not present:

 ~]# gluster volume set all cluster.enable-shared-storage enable
volume set: failed: The hook-script (/var/lib/glusterd/hooks/1/set/post/S32gluster_enable_shared_storage.sh) required for this operation is not present. Please install the hook-script and retry


CLI failed with proper error message When tried to disable shared storage when hoot scrip not present in the location:

]# 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: The hook-script (/var/lib/glusterd/hooks/1/set/post/S32gluster_enable_shared_storage.sh) required for this operation is not present. Please install the hook-script and retry

With these details moving this bug to verified state.

Comment 10 errata-xmlrpc 2017-03-23 06:15:21 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


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