]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: period oid doesn't include realm id
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 14 Oct 2015 21:48:51 +0000 (14:48 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:13:12 +0000 (16:13 -0800)
So that realm id is not a dependency for reading period.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_admin.cc
src/rgw/rgw_rados.cc

index 17064377ca4554c00ba385f6668598daa3f1996c..51ef5db316637c5d221761579bbf623b27416204 100644 (file)
@@ -2034,12 +2034,6 @@ int main(int argc, char **argv)
     case OPT_REALM_GET:
       {
        RGWRealm realm(realm_id, realm_name);
-#if 0
-       if (
-         cerr << "missing realm name or id" << std::endl;
-         return -EINVAL;
-       }
-#endif
        int ret = realm.init(g_ceph_context, store);
        if (ret < 0) {
          if (ret == -ENOENT && realm_name.empty() && realm_id.empty()) {
index 0df99ffb37f7a930a56657ad8a02228abf1cd680..4f6509ba74a2c6fb5fa12b3c32ec05673a66b8c9 100644 (file)
@@ -662,7 +662,7 @@ int RGWPeriod::init(CephContext *_cct, RGWRados *_store, bool setup_obj)
   if (!setup_obj)
     return 0;
 
-  if (id.empty() || realm_id.empty()) {
+  if (id.empty()) {
     RGWRealm realm(realm_id, realm_name);
     int ret = realm.init(cct, store);
     if (ret < 0) {
@@ -702,7 +702,7 @@ const string& RGWPeriod::get_info_oid_prefix()
 
 const string RGWPeriod::get_period_oid_prefix()
 {
-  return get_info_oid_prefix() + realm_id + "." + id;
+  return get_info_oid_prefix() + id;
 }
 
 const string RGWPeriod::get_period_oid()
@@ -860,7 +860,7 @@ int RGWPeriod::store_info(bool exclusive)
   rgw_bucket pool(pool_name.c_str());
 
   std::ostringstream oss;
-  oss << get_info_oid_prefix() << realm_id << "." << id << "." << epoch;
+  oss << get_info_oid_prefix() << id << "." << epoch;
   string oid = oss.str();
   bufferlist bl;
   ::encode(*this, bl);