From 8b70dc62f44ffab9a8f21880480a17ff82145cda Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 18 Nov 2016 15:49:15 -0500 Subject: [PATCH] rgw: region conversion respects pre-existing rgw_region_root_pool Fixes: http://tracker.ceph.com/issues/17963 Signed-off-by: Casey Bodley --- src/common/config_opts.h | 1 + src/rgw/rgw_main.cc | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 2e3b8ce4f7bb7..3057e8f1a55ca 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -1445,6 +1445,7 @@ OPTION(rgw_zone, OPT_STR, "") // zone name OPTION(rgw_zone_root_pool, OPT_STR, ".rgw.root") // pool where zone specific info is stored OPTION(rgw_default_zone_info_oid, OPT_STR, "default.zone") // oid where default zone info is stored OPTION(rgw_region, OPT_STR, "") // region name +OPTION(rgw_region_root_pool, OPT_STR, ".rgw.root") // pool where all region info is stored OPTION(rgw_default_region_info_oid, OPT_STR, "default.region") // oid where default region info is stored OPTION(rgw_zonegroup, OPT_STR, "") // zone group name OPTION(rgw_zonegroup_root_pool, OPT_STR, ".rgw.root") // pool where all zone group info is stored diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index c4a898e0a4a7b..52952ae1d7b64 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -271,6 +271,20 @@ int main(int argc, const char **argv) } } + // maintain existing region root pool for new multisite objects + if (!g_conf->rgw_region_root_pool.empty()) { + const char *root_pool = g_conf->rgw_region_root_pool.c_str(); + if (g_conf->rgw_zonegroup_root_pool.empty()) { + g_conf->set_val_or_die("rgw_zonegroup_root_pool", root_pool); + } + if (g_conf->rgw_period_root_pool.empty()) { + g_conf->set_val_or_die("rgw_period_root_pool", root_pool); + } + if (g_conf->rgw_realm_root_pool.empty()) { + g_conf->set_val_or_die("rgw_realm_root_pool", root_pool); + } + } + check_curl(); if (g_conf->daemonize) { -- 2.39.5