summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-01-31 14:33:29 -0800
committerYehuda Sadeh <yehuda@inktank.com>2013-03-22 11:23:57 -0700
commit020fb1a02ccb460108902790d3419835744a2660 (patch)
tree8aae3db674a5ed3de0951929e0d0b0b4b69d9082
parent8bd7915717ed837f16849dfe87f3d1bdb6152425 (diff)
downloadceph-020fb1a02ccb460108902790d3419835744a2660.tar.gz
rgw: s/cluster/zone
Old cluster definition is what we'd call zone from now on. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r--src/common/config_opts.h2
-rw-r--r--src/rgw/rgw_admin.cc15
-rw-r--r--src/rgw/rgw_rados.cc16
3 files changed, 18 insertions, 15 deletions
diff --git a/src/common/config_opts.h b/src/common/config_opts.h
index 62d2d4cc010..cfed4f3374b 100644
--- a/src/common/config_opts.h
+++ b/src/common/config_opts.h
@@ -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)
diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc
index b4838ae5009..d940dbc08d9 100644
--- a/src/rgw/rgw_admin.cc
+++ b/src/rgw/rgw_admin.cc
@@ -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);
}
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc
index 85a631902fa..b79dd84873d 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -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;