Commit 78aaa966 authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

Better error messages in case a ceph pool does not have a quota, and thus appears with 0 size

parent 75cb8f14
...@@ -1439,7 +1439,7 @@ BEGIN ...@@ -1439,7 +1439,7 @@ BEGIN
UPDATE /*+ INDEX(Subrequest PK_Subrequest_Id)*/ SubRequest UPDATE /*+ INDEX(Subrequest PK_Subrequest_Id)*/ SubRequest
SET status = dconst.SUBREQUEST_FAILED, SET status = dconst.SUBREQUEST_FAILED,
errorCode = serrno.ENOSPC, -- No space left on device errorCode = serrno.ENOSPC, -- No space left on device
errorMessage = 'File creation canceled since diskPool is full' errorMessage = 'File creation canceled since pool is full'
WHERE id = srId; WHERE id = srId;
RETURN; RETURN;
END IF; END IF;
......
...@@ -111,6 +111,8 @@ class ReporterThread(threading.Thread): ...@@ -111,6 +111,8 @@ class ReporterThread(threading.Thread):
for dataPool in dataPools: for dataPool in dataPools:
try: try:
totalSpace = quotas[dataPool] totalSpace = quotas[dataPool]
if 0 == totalSpace:
raise Exception("Quota missing in datapool %s (set to 0)" % dataPool)
freeSpace = totalSpace - usedSpace[dataPool] freeSpace = totalSpace - usedSpace[dataPool]
# fill report # fill report
reports.append((diskServerName, dataPool, maxFreeSpace, minAllowedFreeSpace, reports.append((diskServerName, dataPool, maxFreeSpace, minAllowedFreeSpace,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment