From 35830359dff39bc0636a5fc68524c964dd5989f3 Mon Sep 17 00:00:00 2001 From: Yuval Lifshitz Date: Tue, 9 May 2023 21:10:37 +0300 Subject: [PATCH] rgw/lua: add more info on package install errors Fixes: https://tracker.ceph.com/issues/59698 Signed-off-by: Yuval Lifshitz --- src/rgw/rgw_appmain.cc | 2 +- src/rgw/rgw_lua.cc | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_appmain.cc b/src/rgw/rgw_appmain.cc index c4662b570fa..9bc85b96eb4 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 33af6037011..884ebe3aef9 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; } -- 2.39.5