#include "services/svc_sys_obj_cache.h"
#include "services/svc_sys_obj_core.h"
#include "services/svc_user_rados.h"
+#include "services/svc_role_rados.h"
#include "common/errno.h"
#include "rgw_metadata.h"
#include "rgw_otp.h"
#include "rgw_user.h"
+#include "rgw_role.h"
#define dout_subsys ceph_subsys_rgw
sysobj = std::make_unique<RGWSI_SysObj>(cct);
sysobj_core = std::make_unique<RGWSI_SysObj_Core>(cct);
user_rados = std::make_unique<RGWSI_User_RADOS>(cct);
+ role_rados = std::make_unique<RGWSI_Role_RADOS>(cct);
if (have_cache) {
sysobj_cache = std::make_unique<RGWSI_SysObj_Cache>(dpp, cct);
}
user_rados->init(rados.get(), zone.get(), sysobj.get(), sysobj_cache.get(),
meta.get(), meta_be_sobj.get(), sync_modules.get());
+ role_rados->init(zone.get(), meta.get(), meta_be_sobj.get(), sysobj.get());
can_shutdown = true;
ldpp_dout(dpp, 0) << "ERROR: failed to start otp service (" << cpp_strerror(-r) << dendl;
return r;
}
+
+ r = role_rados->start(y, dpp);
+ if (r < 0) {
+ ldout(cct, 0) << "ERROR: failed to start role_rados service (" << cpp_strerror(-r) << dendl;
+ return r;
+ }
}
/* cache or core services will be started by sysobj */
cache = _svc.sysobj_cache.get();
core = _svc.sysobj_core.get();
user = _svc.user_rados.get();
+ role = _svc.role_rados.get();
return 0;
}
class RGWSI_Notify;
class RGWSI_OTP;
class RGWSI_RADOS;
+class RGWSI_Role;
+class RGWSI_Role_RADOS;
class RGWSI_Zone;
class RGWSI_ZoneUtils;
class RGWSI_Quota;
std::unique_ptr<RGWSI_SysObj_Cache> sysobj_cache;
std::unique_ptr<RGWSI_User_RADOS> user_rados;
std::unique_ptr<RGWDataChangesLog> datalog_rados;
+ std::unique_ptr<RGWSI_Role_RADOS> role_rados;
RGWServices_Def();
~RGWServices_Def();
RGWSI_SysObj_Cache *cache{nullptr};
RGWSI_SysObj_Core *core{nullptr};
RGWSI_User *user{nullptr};
+ RGWSI_Role *role{nullptr};
int do_init(CephContext *cct, bool have_cache, bool raw_storage, bool run_sync, optional_yield y, const DoutPrefixProvider *dpp);
class RGWUserCtl;
class RGWBucketCtl;
class RGWOTPCtl;
+class RGWRoleCtl;
struct RGWCtlDef {
struct _meta {
std::unique_ptr<RGWMetadataHandler> bucket_instance;
std::unique_ptr<RGWMetadataHandler> user;
std::unique_ptr<RGWMetadataHandler> otp;
+ std::unique_ptr<RGWMetadataHandler> role;
_meta();
~_meta();
std::unique_ptr<RGWUserCtl> user;
std::unique_ptr<RGWBucketCtl> bucket;
std::unique_ptr<RGWOTPCtl> otp;
+ std::unique_ptr<RGWRoleCtl> role;
RGWCtlDef();
~RGWCtlDef();
RGWMetadataHandler *bucket_instance{nullptr};
RGWMetadataHandler *user{nullptr};
RGWMetadataHandler *otp{nullptr};
+ RGWMetadataHandler *role{nullptr};
} meta;
RGWUserCtl *user{nullptr};
RGWBucketCtl *bucket{nullptr};
RGWOTPCtl *otp{nullptr};
+ RGWRoleCtl *role{nullptr};
int init(RGWServices *_svc, const DoutPrefixProvider *dpp);
};