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: v10.2.6~72^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=af10e57157cc857026c71d8053f87f3fd7bdc182;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 (cherry picked from commit 8b70dc62f44ffab9a8f21880480a17ff82145cda) --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 3795f0ec3e6c..42ea24c84e02 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -1335,6 +1335,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 b5adf5ebd25d..13959228a458 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -255,6 +255,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) {