]> git-server-git.apps.pok.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)
committerLoic Dachary <ldachary@redhat.com>
Wed, 23 Nov 2016 08:16:13 +0000 (09:16 +0100)
Fixes: http://tracker.ceph.com/issues/17963
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 8b70dc62f44ffab9a8f21880480a17ff82145cda)

src/common/config_opts.h
src/rgw/rgw_main.cc

index 3795f0ec3e6c2f998b09ee005622ca2292638351..42ea24c84e0281a67a46661d659404b47cd15892 100644 (file)
@@ -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
index b5adf5ebd25daff8588c2fe731761d3fd00c8072..13959228a4583690723f31f19c68a52359a2507d 100644 (file)
@@ -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) {