Skip to content

Commit

Permalink
Merge pull request #12156 from dachary/wip-17969-jewel
Browse files Browse the repository at this point in the history
jewel: rgw: multisite upgrade from hammer -> jewel ignores rgw_region_root_pool

Reviewed-by: Nathan Cutler <ncutler@suse.com>
  • Loading branch information
smithfarm committed Feb 1, 2017
2 parents 8a86bf5 + a0b4e60 commit 41fcf74
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/common/config_opts.h
Expand Up @@ -1340,6 +1340,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
Expand Down
14 changes: 14 additions & 0 deletions src/rgw/rgw_main.cc
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/rgw/rgw_rados.cc
Expand Up @@ -3242,9 +3242,9 @@ int RGWRados::convert_regionmap()
{
RGWZoneGroupMap zonegroupmap;

string pool_name = cct->_conf->rgw_zone_root_pool;
string pool_name = cct->_conf->rgw_region_root_pool;
if (pool_name.empty()) {
pool_name = RGW_DEFAULT_ZONE_ROOT_POOL;
pool_name = RGW_DEFAULT_ZONEGROUP_ROOT_POOL;
}
string oid = region_map_oid;

Expand Down

0 comments on commit 41fcf74

Please sign in to comment.