path: root/gluster/swift/obj/
diff options
authorPrashanth Pai <>2013-10-30 16:13:50 +0530
committerLuis Pabon <>2013-11-15 09:06:21 -0800
commitc6d7ddc4bcdefbe7e30946c5c7eb26e74ad0ff0e (patch)
treea6d78410d90a460acfe910e76f5bc529fd6c9031 /gluster/swift/obj/
parentf54e06b612a6fdf04827ae32503dac5a7da5eb4e (diff)
Improve logging and raising DiskFileNoSpace
This commit only improves logging whenever ENOSPC (No space on disk) or EDQUOT (Quota limit exceeded) is returned by glusterfs Also, added methods to: - get filename from file descriptor - log with rate limit Caveat: Although raising DiskFileNoSpace results in object-server returning HTTPInsufficientStorage[507] correctly, the swift proxy-server invokes "best_response" method that returns [503] to the user. When write-behind translator is turned on in glusterfs, it may set errno to EIO instead of ENOSPC/EDQUOT. This is documented in BZ 986812 BUG: 985862, 985253, 1020724 Change-Id: Ib0c5e41c11a8cdccc2077f71c31d8a23229452bb Signed-off-by: Prashanth Pai <> Reviewed-on: Reviewed-by: Luis Pabon <> Tested-by: Luis Pabon <> Reviewed-on:
Diffstat (limited to 'gluster/swift/obj/')
1 files changed, 3 insertions, 2 deletions
diff --git a/gluster/swift/obj/ b/gluster/swift/obj/
index b09179d..6e6856d 100644
--- a/gluster/swift/obj/
+++ b/gluster/swift/obj/
@@ -904,8 +904,9 @@ class DiskFile(object):
fd = do_open(tmppath,
except GlusterFileSystemOSError as gerr:
- if gerr.errno == errno.ENOSPC:
- # Raise DiskFileNoSpace to be handled by upper layers
+ if gerr.errno in (errno.ENOSPC, errno.EDQUOT):
+ # Raise DiskFileNoSpace to be handled by upper layers when
+ # there is no space on disk OR when quota is exceeded
raise DiskFileNoSpace()
if gerr.errno not in (errno.ENOENT, errno.EEXIST, errno.EIO):
# FIXME: Other cases we should handle?