return get_obj_data_pool(placement_rule, obj, &raw_obj->pool);
}
+std::string RGWRados::get_cluster_fsid(const DoutPrefixProvider *dpp, optional_yield y)
+{
+ return svc.rados->cluster_fsid();
+}
+
int RGWRados::get_obj_head_ioctx(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::IoCtx *ioctx)
{
string oid, key;
// This field represents the number of bucket index object shards
uint32_t bucket_index_max_shards;
+ std::string get_cluster_fsid(const DoutPrefixProvider *dpp, optional_yield y);
+
int get_obj_head_ref(const DoutPrefixProvider *dpp, const rgw_placement_rule& target_placement_rule, const rgw_obj& obj, rgw_rados_ref *ref);
int get_obj_head_ref(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_rados_ref *ref);
int get_system_obj_ref(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, rgw_rados_ref *ref);
Store() {}
virtual ~Store() = default;
+ /** Get cluster unique identifier */
+ virtual std::string get_cluster_id(const DoutPrefixProvider* dpp, optional_yield y) = 0;
/** Get a User from a rgw_user. Does not query store for user info, so quick */
virtual std::unique_ptr<User> get_user(const rgw_user& u) = 0;
/** Lookup a User by access key. Queries store for user info. */
return std::make_unique<RadosUser>(this, u);
}
+std::string RadosStore::get_cluster_id(const DoutPrefixProvider* dpp, optional_yield y)
+{
+ return getRados()->get_cluster_fsid(dpp, y);
+}
+
int RadosStore::get_user_by_access_key(const DoutPrefixProvider* dpp, const std::string& key, optional_yield y, std::unique_ptr<User>* user)
{
RGWUserInfo uinfo;
}
virtual std::unique_ptr<User> get_user(const rgw_user& u) override;
+ virtual std::string get_cluster_id(const DoutPrefixProvider* dpp, optional_yield y) override;
virtual int get_user_by_access_key(const DoutPrefixProvider* dpp, const std::string& key, optional_yield y, std::unique_ptr<User>* user) override;
virtual int get_user_by_email(const DoutPrefixProvider* dpp, const std::string& email, optional_yield y, std::unique_ptr<User>* user) override;
virtual int get_user_by_swift(const DoutPrefixProvider* dpp, const std::string& user_str, optional_yield y, std::unique_ptr<User>* user) override;
return &rados;
}
+std::string RGWSI_RADOS::cluster_fsid()
+{
+ std::string fsid;
+ (void) get_rados_handle()->cluster_fsid(&fsid);
+ return fsid;
+}
+
uint64_t RGWSI_RADOS::instance_id()
{
return get_rados_handle()->get_instance_id();
void init() {}
void shutdown() override;
+ std::string cluster_fsid();
uint64_t instance_id();
bool check_secure_mon_conn(const DoutPrefixProvider *dpp) const;