return 0;
}
-int write_script(rgw::sal::RGWRadosStore* store, const std::string& tenant, optional_yield y, context ctx, const std::string& script)
+int write_script(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, const std::string& tenant, optional_yield y, context ctx, const std::string& script)
{
RGWSysObjectCtx obj_ctx(store->svc()->sysobj->init_obj_ctx());
RGWObjVersionTracker objv_tracker;
ceph::encode(script, bl);
const auto rc = rgw_put_system_obj(
+ dpp,
obj_ctx,
obj.pool,
obj.oid,
return 0;
}
-int delete_script(rgw::sal::RGWRadosStore* store, const std::string& tenant, optional_yield y, context ctx)
+int delete_script(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, const std::string& tenant, optional_yield y, context ctx)
{
RGWObjVersionTracker objv_tracker;
rgw_raw_obj obj(store->svc()->zone->get_zone_params().log_pool, script_oid(ctx, tenant));
const auto rc = rgw_delete_system_obj(
+ dpp,
store->svc()->sysobj,
obj.pool,
obj.oid,
namespace bp = boost::process;
-int add_package(rgw::sal::RGWRadosStore* store, optional_yield y, const std::string& package_name, bool allow_compilation) {
+int add_package(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, optional_yield y, const std::string& package_name, bool allow_compilation) {
// verify that luarocks can load this oackage
const auto p = bp::search_path("luarocks");
if (p.empty()) {
std::map<std::string, bufferlist> new_package{{package_name, empty_bl}};
librados::ObjectWriteOperation op;
op.omap_set(new_package);
- ret = rgw_rados_operate(*(store->getRados()->get_lc_pool_ctx()),
+ ret = rgw_rados_operate(dpp, *(store->getRados()->get_lc_pool_ctx()),
PACKAGE_LIST_OBJECT_NAME, &op, y);
if (ret < 0) {
return 0;
}
-int remove_package(rgw::sal::RGWRadosStore* store, optional_yield y, const std::string& package_name) {
+int remove_package(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, optional_yield y, const std::string& package_name) {
librados::ObjectWriteOperation op;
op.omap_rm_keys(std::set<std::string>({package_name}));
- const auto ret = rgw_rados_operate(*(store->getRados()->get_lc_pool_ctx()),
+ const auto ret = rgw_rados_operate(dpp, *(store->getRados()->get_lc_pool_ctx()),
PACKAGE_LIST_OBJECT_NAME, &op, y);
if (ret < 0) {
return 0;
}
-int list_packages(rgw::sal::RGWRadosStore* store, optional_yield y, packages_t& packages) {
+int list_packages(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, optional_yield y, packages_t& packages) {
constexpr auto max_chunk = 1024U;
std::string start_after;
bool more = true;
librados::ObjectReadOperation op;
packages_t packages_chunk;
op.omap_get_keys2(start_after, max_chunk, &packages_chunk, &more, &rval);
- const auto ret = rgw_rados_operate(*(store->getRados()->get_lc_pool_ctx()),
+ const auto ret = rgw_rados_operate(dpp, *(store->getRados()->get_lc_pool_ctx()),
PACKAGE_LIST_OBJECT_NAME, &op, nullptr, y);
if (ret < 0) {
return 0;
}
-int install_packages(rgw::sal::RGWRadosStore* store, optional_yield y, packages_t& failed_packages, std::string& output) {
+int install_packages(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, optional_yield y, packages_t& failed_packages, std::string& output) {
// luarocks directory cleanup
boost::system::error_code ec;
const auto& luarocks_path = store->get_luarocks_path();
}
packages_t packages;
- auto ret = list_packages(store, y, packages);
+ auto ret = list_packages(dpp, store, y, packages);
if (ret == -ENOENT) {
// allowlist is empty
return 0;