]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/lua: add more info on package install errors
authorYuval Lifshitz <yuvalif@yahoo.com>
Tue, 9 May 2023 18:10:37 +0000 (21:10 +0300)
committerYuval Lifshitz <yuvalif@yahoo.com>
Tue, 9 May 2023 18:10:37 +0000 (21:10 +0300)
Fixes: https://tracker.ceph.com/issues/59698
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
src/rgw/rgw_appmain.cc
src/rgw/rgw_lua.cc

index c4662b570fa16a2a8be7bfeff19139c41d440d24..9bc85b96eb440159bee1f3d09333d4b7a9b67dca 100644 (file)
@@ -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()) {
index 33af6037011bb9e7eca184bf94ea928b12ef4cd8..884ebe3aef94c08ce351a2e634d5c7bde58693ff 100644 (file)
@@ -162,7 +162,7 @@ int install_packages(const DoutPrefixProvider *dpp, rgw::sal::Driver* driver,
   if (std::filesystem::remove_all(luarocks_path, ec)
       == static_cast<std::uintmax_t>(-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;
   }