This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1315639 - Glusterfind hook script failing if /var/lib/glusterd/glusterfind dir was absent
Glusterfind hook script failing if /var/lib/glusterd/glusterfind dir was absent
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: glusterfind (Show other bugs)
3.7.8
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Aravinda VK
bugs@gluster.org
:
Depends On: 1289935
Blocks: glusterfs-3.7.9
  Show dependency treegraph
 
Reported: 2016-03-08 05:01 EST by Aravinda VK
Modified: 2016-04-19 03:20 EDT (History)
3 users (show)

See Also:
Fixed In Version: glusterfs-3.7.9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1289935
Environment:
Last Closed: 2016-03-22 04:19:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Aravinda VK 2016-03-08 05:01:51 EST
+++ This bug was initially created as a clone of Bug #1289935 +++

Description of problem:
If during cleanup /var/lib/glusterd directory is deleted, glusterfind directory will not be present. The cleanup script expects glusterfind directory to be present.

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


How reproducible:
Always

Steps to Reproduce:
1. Install Gluster, rm -rf /var/lib/glusterd except hooks directory. and restart glusterd
2. Create a Volume
3. Delete Volume

Actual results:
Hook execution errors seen in glusterd logs.

[2015-11-11 13:03:41.906892] I [MSGID: 106495] [glusterd-handler.c:3049:__glusterd_handle_getwd] 0-glusterd: Received getwd req
[2015-11-11 13:03:41.910931] E [run.c:190:runner_log] (-->/usr/lib64/glusterfs/3.7.5/xlator/mgmt/glusterd.so(+0xef3d2) [0x7fc7d60923d2] -->/usr/lib64/glusterfs/3.7.5/xlator/mgmt/glusterd.so(glusterd_hooks_run_hooks+0x470) [0x7fc7d6092060] -->/usr/lib64/libglusterfs.so.0(runner_log+0x11e) [0x7fc7e162868e] ) 0-management: Failed to execute script: /var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post.py --volname=VOL_ZIMBRA 

Expected results:
No errors seen in Logs

Additional info:
When executed directly,

# /var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post.py --volname=VOL_ZIMBRA
Traceback (most recent call last):
  File "/var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post.py", line 60, in <module>
    main()
  File "/var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post.py", line 43, in main
    for session in os.listdir(glusterfind_dir):
OSError: [Errno 2] No such file or directory: '/var/lib/glusterd/glusterfind'

--- Additional comment from Vijay Bellur on 2015-12-09 06:43:18 EST ---

REVIEW: http://review.gluster.org/12923 (tools/glusterfind: Do not fail cleanup script on volume delete) posted (#1) for review on master by Aravinda VK (avishwan@redhat.com)

--- Additional comment from Vijay Bellur on 2015-12-10 05:00:11 EST ---

REVIEW: http://review.gluster.org/12923 (tools/glusterfind: Do not fail cleanup script on volume delete) posted (#2) for review on master by Aravinda VK (avishwan@redhat.com)

--- Additional comment from Vijay Bellur on 2016-02-24 23:36:14 EST ---

REVIEW: http://review.gluster.org/12923 (tools/glusterfind: Do not fail cleanup script on volume delete) posted (#3) for review on master by Aravinda VK (avishwan@redhat.com)

--- Additional comment from Vijay Bellur on 2016-02-29 00:58:18 EST ---

REVIEW: http://review.gluster.org/12923 (tools/glusterfind: Do not fail cleanup script on volume delete) posted (#4) for review on master by Aravinda VK (avishwan@redhat.com)

--- Additional comment from Vijay Bellur on 2016-03-02 06:48:25 EST ---

REVIEW: http://review.gluster.org/12923 (tools/glusterfind: Do not fail cleanup script on volume delete) posted (#5) for review on master by Aravinda VK (avishwan@redhat.com)

--- Additional comment from Vijay Bellur on 2016-03-08 04:58:15 EST ---

COMMIT: http://review.gluster.org/12923 committed in master by Aravinda VK (avishwan@redhat.com) 
------
commit 62047c80f541985bf9caa41336f471d95de3ce1c
Author: Aravinda VK <avishwan@redhat.com>
Date:   Wed Dec 9 17:09:42 2015 +0530

    tools/glusterfind: Do not fail cleanup script on volume delete
    
    If glusterfind dir is not present inside GLUSTERD_WORKDIR, then
    cleanup script Post Volume delete was failing. This patch safely
    handles the absence of glusterfind directory in GLUSTERD_WORKDIR
    
    BUG: 1289935
    Change-Id: I9f7e6035e3dc6079927803df942b0f921218c79a
    Signed-off-by: Aravinda VK <avishwan@redhat.com>
    Reviewed-on: http://review.gluster.org/12923
    Smoke: Gluster Build System <jenkins@build.gluster.com>
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Kotresh HR <khiremat@redhat.com>
Comment 1 Vijay Bellur 2016-03-08 05:02:47 EST
REVIEW: http://review.gluster.org/13642 (tools/glusterfind: Do not fail cleanup script on volume delete) posted (#1) for review on release-3.7 by Aravinda VK (avishwan@redhat.com)
Comment 2 Vijay Bellur 2016-03-08 14:37:29 EST
REVIEW: http://review.gluster.org/13642 (tools/glusterfind: Do not fail cleanup script on volume delete) posted (#2) for review on release-3.7 by Vijay Bellur (vbellur@redhat.com)
Comment 3 Vijay Bellur 2016-03-09 07:02:51 EST
COMMIT: http://review.gluster.org/13642 committed in release-3.7 by Vijay Bellur (vbellur@redhat.com) 
------
commit d6361f4d52251fe5f2e3af11e3a95fd0cf30a567
Author: Aravinda VK <avishwan@redhat.com>
Date:   Wed Dec 9 17:09:42 2015 +0530

    tools/glusterfind: Do not fail cleanup script on volume delete
    
    If glusterfind dir is not present inside GLUSTERD_WORKDIR, then
    cleanup script Post Volume delete was failing. This patch safely
    handles the absence of glusterfind directory in GLUSTERD_WORKDIR
    
    BUG: 1315639
    Change-Id: I9f7e6035e3dc6079927803df942b0f921218c79a
    Signed-off-by: Aravinda VK <avishwan@redhat.com>
    Reviewed-on: http://review.gluster.org/12923
    Smoke: Gluster Build System <jenkins@build.gluster.com>
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Kotresh HR <khiremat@redhat.com>
    (cherry picked from commit 62047c80f541985bf9caa41336f471d95de3ce1c)
    Reviewed-on: http://review.gluster.org/13642
    Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Comment 4 Kaushal 2016-04-19 03:20:46 EDT
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.9, please open a new bug report.

glusterfs-3.7.9 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://www.gluster.org/pipermail/gluster-users/2016-March/025922.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

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