]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: s/cluster/zone
authorYehuda Sadeh <yehuda@inktank.com>
Thu, 31 Jan 2013 22:33:29 +0000 (14:33 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Fri, 22 Mar 2013 18:23:57 +0000 (11:23 -0700)
Old cluster definition is what we'd call zone from now on.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/common/config_opts.h
src/rgw/rgw_admin.cc
src/rgw/rgw_rados.cc

index 62d2d4cc01015336bc56a345bb0690e19f508e97..cfed4f3374b13da3bb2997ead34305da080d509d 100644 (file)
@@ -537,7 +537,7 @@ OPTION(rgw_op_thread_suicide_timeout, OPT_INT, 0)
 OPTION(rgw_thread_pool_size, OPT_INT, 100)
 OPTION(rgw_num_control_oids, OPT_INT, 8)
 
-OPTION(rgw_cluster_root_pool, OPT_STR, ".rgw.root")
+OPTION(rgw_zone_root_pool, OPT_STR, ".rgw.root")
 OPTION(rgw_log_nonexistent_bucket, OPT_BOOL, false)
 OPTION(rgw_log_object_name, OPT_STR, "%Y-%m-%d-%H-%i-%n")      // man date to see codes (a subset are supported)
 OPTION(rgw_log_object_name_utc, OPT_BOOL, false)
index b4838ae500999dea43dc5e776118533096155bd4..d940dbc08d9b55cba411e596c86ec8be350ba27c 100644 (file)
@@ -58,7 +58,7 @@ void _usage()
   cerr << "  bucket check               check bucket index\n";
   cerr << "  object rm                  remove object\n";
   cerr << "  object unlink              unlink object from bucket index\n";
-  cerr << "  cluster info               show cluster params info\n";
+  cerr << "  zone info                  show zone params info\n";
   cerr << "  pool add                   add an existing pool for data placement\n";
   cerr << "  pool rm                    remove an existing pool from data placement set\n";
   cerr << "  pools list                 list placement active set\n";
@@ -162,7 +162,7 @@ enum {
   OPT_OBJECT_UNLINK,
   OPT_GC_LIST,
   OPT_GC_PROCESS,
-  OPT_CLUSTER_INFO,
+  OPT_ZONE_INFO,
   OPT_CAPS_ADD,
   OPT_CAPS_RM,
 };
@@ -188,7 +188,6 @@ static int get_cmd(const char *cmd, const char *prev_cmd, bool *need_more)
   if (strcmp(cmd, "bucket") == 0 ||
       strcmp(cmd, "buckets") == 0 ||
       strcmp(cmd, "caps") == 0 ||
-      strcmp(cmd, "cluster") == 0 ||
       strcmp(cmd, "gc") == 0 || 
       strcmp(cmd, "key") == 0 ||
       strcmp(cmd, "log") == 0 ||
@@ -196,6 +195,10 @@ static int get_cmd(const char *cmd, const char *prev_cmd, bool *need_more)
       strcmp(cmd, "pool") == 0 ||
       strcmp(cmd, "pools") == 0 ||
       strcmp(cmd, "subuser") == 0 ||
+      strcmp(cmd, "log") == 0 ||
+      strcmp(cmd, "usage") == 0 ||
+      strcmp(cmd, "object") == 0 ||
+      strcmp(cmd, "zone") == 0 ||
       strcmp(cmd, "temp") == 0 ||
       strcmp(cmd, "usage") == 0 ||
       strcmp(cmd, "user") == 0) {
@@ -285,9 +288,9 @@ static int get_cmd(const char *cmd, const char *prev_cmd, bool *need_more)
       return OPT_OBJECT_RM;
     if (strcmp(cmd, "unlink") == 0)
       return OPT_OBJECT_UNLINK;
-  } else if (strcmp(prev_cmd, "cluster") == 0) {
+  } else if (strcmp(prev_cmd, "zone") == 0) {
     if (strcmp(cmd, "info") == 0)
-      return OPT_CLUSTER_INFO;
+      return OPT_ZONE_INFO;
   } else if (strcmp(prev_cmd, "gc") == 0) {
     if (strcmp(cmd, "list") == 0)
       return OPT_GC_LIST;
@@ -1797,7 +1800,7 @@ next:
     }
   }
 
-  if (opt_cmd == OPT_CLUSTER_INFO) {
+  if (opt_cmd == OPT_ZONE_INFO) {
     store->params.dump(formatter);
     formatter->flush(cout);
   }
index 85a631902fa302e92b0957d4e73a180ea76a67c2..b79dd84873d38817d82a2cd4cb5e5f32d11679af 100644 (file)
@@ -46,7 +46,7 @@ static string dir_oid_prefix = ".dir.";
 static string default_storage_pool = ".rgw.buckets";
 static string avail_pools = ".pools.avail";
 
-static string cluster_info_oid = "cluster_info";
+static string zone_info_oid = "zone_info";
 
 
 static RGWObjCategory shadow_category = RGW_OBJ_CATEGORY_SHADOW;
@@ -54,7 +54,7 @@ static RGWObjCategory main_category = RGW_OBJ_CATEGORY_MAIN;
 
 #define RGW_USAGE_OBJ_PREFIX "usage."
 
-#define RGW_DEFAULT_CLUSTER_ROOT_POOL ".rgw.root"
+#define RGW_DEFAULT_zone_ROOT_POOL ".rgw.root"
 
 
 #define dout_subsys ceph_subsys_rgw
@@ -75,7 +75,7 @@ void RGWRadosParams::init_default()
 
 void RGWRadosParams::dump(Formatter *f) const
 {
-  f->open_object_section("cluster");
+  f->open_object_section("zone");
   f->dump_string("domain_root", domain_root.pool);
   f->dump_string("control_pool", control_pool.pool);
   f->dump_string("gc_pool", gc_pool.pool);
@@ -91,14 +91,14 @@ void RGWRadosParams::dump(Formatter *f) const
 
 int RGWRadosParams::init(CephContext *cct, RGWRados *store)
 {
-  string pool_name = cct->_conf->rgw_cluster_root_pool;
+  string pool_name = cct->_conf->rgw_zone_root_pool;
   if (pool_name.empty())
-    pool_name = RGW_DEFAULT_CLUSTER_ROOT_POOL;
+    pool_name = RGW_DEFAULT_zone_ROOT_POOL;
 
   rgw_bucket pool(pool_name.c_str());
   bufferlist bl;
 
-  int ret = rgw_get_obj(store, NULL, pool, cluster_info_oid, bl);
+  int ret = rgw_get_obj(store, NULL, pool, zone_info_oid, bl);
   if (ret == -ENOENT) {
     init_default();
     return 0; // don't try to store obj, we're not fully initialized yet
@@ -110,7 +110,7 @@ int RGWRadosParams::init(CephContext *cct, RGWRados *store)
     bufferlist::iterator iter = bl.begin();
     ::decode(*this, iter);
   } catch (buffer::error& err) {
-    ldout(cct, 0) << "ERROR: failed to decode cluster info from " << pool << ":" << cluster_info_oid << dendl;
+    ldout(cct, 0) << "ERROR: failed to decode zone info from " << pool << ":" << zone_info_oid << dendl;
     return -EIO;
   }
 
@@ -554,7 +554,7 @@ int RGWRados::log_usage(map<rgw_user_bucket, RGWUsageBatch>& usage_info)
   string hash;
   string last_user;
 
-  /* restructure usage map, cluster by object hash */
+  /* restructure usage map, zone by object hash */
   map<rgw_user_bucket, RGWUsageBatch>::iterator iter;
   for (iter = usage_info.begin(); iter != usage_info.end(); ++iter) {
     const rgw_user_bucket& ub = iter->first;