summaryrefslogtreecommitdiff
path: root/include/ibm
diff options
context:
space:
mode:
authorSunitha Harish <sunithaharish04@gmail.com>2022-08-08 10:07:12 +0300
committerSunitha Harish <sunithaharish04@gmail.com>2022-09-06 05:00:03 +0300
commitf8a4347ec8afa33c927f652ab0a5ed9ddbb37b98 (patch)
tree509ea935da819ab7356c1c58b3338a04ad0ccbdb /include/ibm
parent382d64759b0848f18bad9e0d85a8291529ced0e9 (diff)
downloadbmcweb-f8a4347ec8afa33c927f652ab0a5ed9ddbb37b98.tar.xz
Fixes for IBM Management Console usecases
This commit fixes the below issues 1. Bump up the ConfigFile directory max limit For large configurations on the system, the current directory size upper limit of 10MB was exceeding and BMC was sending the error back to the client. This fails the entire large config support. This commit Increases this upper limit of the configFile dir to 25MB 2. Return 409 Error for a lock conflict Tested by: 1. ConfigFile read 2. Single file upload 3. AcquireLock from the same client returns 409 Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com> Change-Id: I9218e8263f31e519d76683822290dfe259c57192
Diffstat (limited to 'include/ibm')
-rw-r--r--include/ibm/management_console_rest.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index 7396ce69d7..e51f64a37a 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -33,7 +33,7 @@ constexpr const char* contentNotAcceptableMsg = "Content Not Acceptable";
constexpr const char* internalServerError = "Internal Server Error";
constexpr size_t maxSaveareaDirSize =
- 10000000; // Allow save area dir size to be max 10MB
+ 25000000; // Allow save area dir size to be max 25MB
constexpr size_t minSaveareaFileSize =
100; // Allow save area file size of minimum 100B
constexpr size_t maxSaveareaFileSize =
@@ -190,7 +190,7 @@ inline void handleFilePut(const crow::Request& req,
asyncResp->res.result(boost::beast::http::status::bad_request);
asyncResp->res.jsonValue["Description"] =
"File size does not fit in the savearea "
- "directory maximum allowed size[10MB]";
+ "directory maximum allowed size[25MB]";
return;
}
@@ -304,7 +304,7 @@ inline void handleFileGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
"/var/lib/bmcweb/ibm-management-console/configfiles/" + fileID);
if (!std::filesystem::exists(loc))
{
- BMCWEB_LOG_ERROR << loc.string() << "Not found";
+ BMCWEB_LOG_ERROR << loc.string() << " Not found";
asyncResp->res.result(boost::beast::http::status::not_found);
asyncResp->res.jsonValue["Description"] = resourceNotFoundMsg;
return;
@@ -313,7 +313,7 @@ inline void handleFileGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
std::ifstream readfile(loc.string());
if (!readfile)
{
- BMCWEB_LOG_ERROR << loc.string() << "Not found";
+ BMCWEB_LOG_ERROR << loc.string() << " Not found";
asyncResp->res.result(boost::beast::http::status::not_found);
asyncResp->res.jsonValue["Description"] = resourceNotFoundMsg;
return;
@@ -489,7 +489,7 @@ inline void
if (validityStatus.first && (validityStatus.second == 1))
{
BMCWEB_LOG_DEBUG << "There is a conflict within itself";
- asyncResp->res.result(boost::beast::http::status::bad_request);
+ asyncResp->res.result(boost::beast::http::status::conflict);
return;
}
}