diff --git a/distributedcloud/dcorch/api/proxy/apps/controller.py b/distributedcloud/dcorch/api/proxy/apps/controller.py index fe6eca49f..98b7a0e49 100644 --- a/distributedcloud/dcorch/api/proxy/apps/controller.py +++ b/distributedcloud/dcorch/api/proxy/apps/controller.py @@ -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): diff --git a/distributedcloud/dcorch/api/proxy/apps/filter.py b/distributedcloud/dcorch/api/proxy/apps/filter.py index ddf16b685..d2da42766 100644 --- a/distributedcloud/dcorch/api/proxy/apps/filter.py +++ b/distributedcloud/dcorch/api/proxy/apps/filter.py @@ -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 scratch='" + ) % (req.path, 3 * req.content_length) + raise webob.exc.HTTPInternalServerError(explanation=msg) if ('HTTP_USER_HEADER' in req.environ and