Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jewel: rgw: multisite upgrade from hammer -> jewel ignores rgw_region_root_pool #12156

Merged
merged 2 commits into from Feb 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/common/config_opts.h
Expand Up @@ -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
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 @@ -3237,9 +3237,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