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>
This commit is contained in:
parent
f44232e6a1
commit
62047c80f5
@ -40,7 +40,12 @@ def main():
|
||||
|
||||
# Check all session directories, if any directory found for
|
||||
# the deleted volume, cleanup all the session directories
|
||||
for session in os.listdir(glusterfind_dir):
|
||||
try:
|
||||
ls_glusterfind_dir = os.listdir(glusterfind_dir)
|
||||
except OSError:
|
||||
ls_glusterfind_dir = []
|
||||
|
||||
for session in ls_glusterfind_dir:
|
||||
# Possible session directory
|
||||
volume_session_path = os.path.join(glusterfind_dir,
|
||||
session,
|
||||
|
Loading…
x
Reference in New Issue
Block a user