]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: region conversion respects pre-existing rgw_region_root_pool
authorCasey Bodley <cbodley@redhat.com>
Fri, 18 Nov 2016 20:49:15 +0000 (15:49 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 18 Nov 2016 21:29:06 +0000 (16:29 -0500)
Fixes: http://tracker.ceph.com/issues/17963
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/config_opts.h
src/rgw/rgw_main.cc

index 2e3b8ce4f7bb7c49863568a2ebf4ed24d3ee9260..3057e8f1a55ca1b67c214859163719f0e036f3df 100644 (file)
@@ -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
index c4a898e0a4a7bf9042cc62eae8f57eeae0e784b0..52952ae1d7b64c9c206baab1640aa353ebdb6a9e 100644 (file)
@@ -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) {