Old cluster definition is what we'd call zone from now on.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
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)
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";
OPT_OBJECT_UNLINK,
OPT_GC_LIST,
OPT_GC_PROCESS,
- OPT_CLUSTER_INFO,
+ OPT_ZONE_INFO,
OPT_CAPS_ADD,
OPT_CAPS_RM,
};
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 ||
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) {
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;
}
}
- if (opt_cmd == OPT_CLUSTER_INFO) {
+ if (opt_cmd == OPT_ZONE_INFO) {
store->params.dump(formatter);
formatter->flush(cout);
}
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;
#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
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);
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
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;
}
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;