From: Casey Bodley Date: Fri, 18 Nov 2016 20:49:15 +0000 (-0500) Subject: rgw: region conversion respects pre-existing rgw_region_root_pool X-Git-Tag: v11.1.0~233^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8b70dc62f44ffab9a8f21880480a17ff82145cda;p=ceph.git rgw: region conversion respects pre-existing rgw_region_root_pool Fixes: http://tracker.ceph.com/issues/17963 Signed-off-by: Casey Bodley --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 2e3b8ce4f7bb..3057e8f1a55c 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 c4a898e0a4a7..52952ae1d7b6 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) {