From: Pritha Srivastava Date: Tue, 26 Oct 2021 06:21:35 +0000 (+0530) Subject: rgw: removing do_start() method from X-Git-Tag: v18.0.0~710^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3f574a39a4514d81ca6523faf4072e033f54c4ee;p=ceph.git rgw: removing do_start() method from RGWRoleMetadataHandler and class RGWSI_Role_Module. Signed-off-by: Pritha Srivastava --- diff --git a/src/rgw/rgw_role.cc b/src/rgw/rgw_role.cc index 420021eb5b8a..dc5f8a2c0aeb 100644 --- a/src/rgw/rgw_role.cc +++ b/src/rgw/rgw_role.cc @@ -287,8 +287,22 @@ void RGWRoleMetadataHandler::init(RGWSI_Zone *_zone_svc, svc.meta = _meta_svc; svc.meta_be = _meta_be_svc; svc.sysobj = _sysobj_svc; + int r = svc.meta->create_be_handler(RGWSI_MetaBackend::Type::MDBE_SOBJ, + &be_handler); + if (r < 0) { + //ldout(ctx(), 0) << "ERROR: failed to create be_handler for Roles: r=" + // << r <(be_handler); + be_module.reset(module); + bh->set_module(module); + base_init(cct, get_be_handler()); } +#if 0 int RGWRoleMetadataHandler::do_start(optional_yield y, const DoutPrefixProvider *dpp) { @@ -306,11 +320,17 @@ int RGWRoleMetadataHandler::do_start(optional_yield y, const DoutPrefixProvider bh->set_module(module); return 0; } +#endif -RGWRoleMetadataHandler::RGWRoleMetadataHandler(CephContext *cct, Store* store) +RGWRoleMetadataHandler::RGWRoleMetadataHandler(CephContext *cct, Store* store, + RGWSI_Zone *_zone_svc, + RGWSI_Meta *_meta_svc, + RGWSI_MetaBackend *_meta_be_svc, + RGWSI_SysObj *_sysobj_svc) { - base_init(cct, get_be_handler()); + this->cct = cct; store = store; + init(_zone_svc, _meta_svc, _meta_be_svc, _sysobj_svc); } void RGWRoleCompleteInfo::dump(ceph::Formatter *f) const diff --git a/src/rgw/rgw_role.h b/src/rgw/rgw_role.h index 03a21eb6d3ef..3f3ac266ec6a 100644 --- a/src/rgw/rgw_role.h +++ b/src/rgw/rgw_role.h @@ -193,9 +193,13 @@ public: RGWSI_MetaBackend_Handler * get_be_handler(); - int do_start(optional_yield y, const DoutPrefixProvider *dpp); + //int do_start(optional_yield y, const DoutPrefixProvider *dpp); - RGWRoleMetadataHandler(CephContext *cct, Store* store); + RGWRoleMetadataHandler(CephContext *cct, Store* store, + RGWSI_Zone *_zone_svc, + RGWSI_Meta *_meta_svc, + RGWSI_MetaBackend *_meta_be_svc, + RGWSI_SysObj *_sysobj_svc); std::string get_type() final { return "roles"; } @@ -228,6 +232,7 @@ private: RGWSI_MetaBackend_Handler *be_handler; std::unique_ptr be_module; std::unique_ptr store; + CephContext *cct; }; } } // namespace rgw::sal diff --git a/src/rgw/rgw_service.cc b/src/rgw/rgw_service.cc index 537334b4cad0..fc723c053941 100644 --- a/src/rgw/rgw_service.cc +++ b/src/rgw/rgw_service.cc @@ -372,7 +372,7 @@ int RGWCtlDef::init(RGWServices& svc, rgw::sal::Store* store, const DoutPrefixPr } meta.otp.reset(RGWOTPMetaHandlerAllocator::alloc()); - meta.role = std::make_unique(svc.cct, store); + meta.role = std::make_unique(svc.cct, store, svc.zone, svc.meta, svc.meta_be_sobj, svc.sysobj); user.reset(new RGWUserCtl(svc.zone, svc.user, (RGWUserMetadataHandler *)meta.user.get())); bucket.reset(new RGWBucketCtl(svc.zone,