From: Yuval Lifshitz Date: Tue, 9 May 2023 18:10:37 +0000 (+0300) Subject: rgw/lua: add more info on package install errors X-Git-Tag: v19.0.0~1235^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=35830359dff39bc0636a5fc68524c964dd5989f3;p=ceph.git rgw/lua: add more info on package install errors Fixes: https://tracker.ceph.com/issues/59698 Signed-off-by: Yuval Lifshitz --- diff --git a/src/rgw/rgw_appmain.cc b/src/rgw/rgw_appmain.cc index c4662b570fa1..9bc85b96eb44 100644 --- a/src/rgw/rgw_appmain.cc +++ b/src/rgw/rgw_appmain.cc @@ -562,7 +562,7 @@ void rgw::AppMain::init_lua() r = rgw::lua::install_packages(dpp, driver, null_yield, path, failed_packages, output); if (r < 0) { - dout(1) << "WARNING: failed to install lua packages from allowlist" + dout(1) << "WARNING: failed to install lua packages from allowlist. error: " << r << dendl; } if (!output.empty()) { diff --git a/src/rgw/rgw_lua.cc b/src/rgw/rgw_lua.cc index 33af6037011b..884ebe3aef94 100644 --- a/src/rgw/rgw_lua.cc +++ b/src/rgw/rgw_lua.cc @@ -162,7 +162,7 @@ int install_packages(const DoutPrefixProvider *dpp, rgw::sal::Driver* driver, if (std::filesystem::remove_all(luarocks_path, ec) == static_cast(-1) && ec != std::errc::no_such_file_or_directory) { - output.append("failed to clear luarock directory: "); + output.append("failed to clear luarocks directory: "); output.append(ec.message()); output.append("\n"); return ec.value(); @@ -175,11 +175,13 @@ int install_packages(const DoutPrefixProvider *dpp, rgw::sal::Driver* driver, return 0; } if (ret < 0) { + output.append("failed to get lua package list"); return ret; } // verify that luarocks exists const auto p = bp::search_path("luarocks"); if (p.empty()) { + output.append("failed to find luarocks"); return -ECHILD; }