object-storage: cleanup err handling in Glusterfs.
Change-Id: I4fa1a7b9214c6897459a99bedde80e84eb2b9cbc BUG: 904370 Signed-off-by: Mohammed Junaid <junaid@redhat.com> Reviewed-on: http://review.gluster.org/4788 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
This commit is contained in:
parent
bbaa273468
commit
bf7b83d2bc
@ -86,14 +86,13 @@ def mount(root, drive):
|
||||
with os.fdopen(fd, 'r+b') as f:
|
||||
try:
|
||||
fcntl.lockf(f, fcntl.LOCK_EX|fcntl.LOCK_NB)
|
||||
except:
|
||||
ex = sys.exc_info()[1]
|
||||
if isinstance(ex, IOError) and ex.errno in \
|
||||
(errno.EACCES, errno.EAGAIN):
|
||||
except IOError as ex:
|
||||
if ex.errno in (errno.EACCES, errno.EAGAIN):
|
||||
# This means that some other process is mounting the
|
||||
# filesystem, so wait for the mount process to complete
|
||||
return _busy_wait(full_mount_path)
|
||||
|
||||
else:
|
||||
raise ex
|
||||
mnt_cmd = 'mount -t glusterfs %s:%s %s' % (MOUNT_IP, export, \
|
||||
full_mount_path)
|
||||
if os.system(mnt_cmd) or not _busy_wait(full_mount_path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user