Merge "Load-import failed due to lack of space in /scratch"
This commit is contained in:
commit
bac49b1840
@ -586,9 +586,9 @@ class SysinvAPIController(APIController):
|
||||
os.path.basename(src_filepath))
|
||||
shutil.copyfile(src_filepath, load_file_path)
|
||||
LOG.info("copied %s to %s" % (src_filepath, load_file_path))
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
msg = _("Failed to store load in vault. Please check "
|
||||
"dcorch log for details.")
|
||||
"dcorch log for more details: %s" % e)
|
||||
raise webob.exc.HTTPInsufficientStorage(explanation=msg)
|
||||
return load_file_path
|
||||
|
||||
@ -715,8 +715,8 @@ class SysinvAPIController(APIController):
|
||||
error = False
|
||||
except webob.exc.HTTPInternalServerError:
|
||||
raise
|
||||
except Exception:
|
||||
msg = _("Unexpected error copying load to vault")
|
||||
except Exception as e:
|
||||
msg = _("Unexpected error copying load to vault: %s" % e)
|
||||
raise webob.exc.HTTPInternalServerError(explanation=msg)
|
||||
finally:
|
||||
if error and os.path.exists(proxy_consts.LOAD_FILES_STAGING_DIR):
|
||||
|
@ -74,8 +74,13 @@ class ApiFiller(Middleware):
|
||||
# 1 time on internal temporary copy to be shared with sysinv
|
||||
if not utils.is_space_available("/scratch",
|
||||
3 * req.content_length):
|
||||
msg = _("Insufficient space on /scratch for request %s"
|
||||
% req.path)
|
||||
msg = _(
|
||||
"Insufficient space on /scratch for request %s, "
|
||||
"/scratch must have at least %d bytes of free space. "
|
||||
"You can delete unused files from /scratch or increase the size of it "
|
||||
"with: 'system host-fs-modify <hostname> scratch=<new_size_in_GiB>'"
|
||||
) % (req.path, 3 * req.content_length)
|
||||
|
||||
raise webob.exc.HTTPInternalServerError(explanation=msg)
|
||||
|
||||
if ('HTTP_USER_HEADER' in req.environ and
|
||||
|
Loading…
Reference in New Issue
Block a user