]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: upgrade default zonegroup and set correct zone[group] id
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 26 Apr 2016 18:31:43 +0000 (11:31 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 9 May 2016 23:18:54 +0000 (16:18 -0700)
Fixes: http://tracker.ceph.com/issues/15597
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 27806c71922eef2f4cde360d7ba40dee9d5bd4bd)

src/rgw/rgw_rados.cc

index 47ba96261c17d5dbe5c760e53fccd465d4fee15d..f7e24197f75d48427e990fc1f2111a7957d61b42 100644 (file)
@@ -3361,9 +3361,9 @@ int RGWRados::replace_region_with_zonegroup()
   /* create zonegroups */
   for (iter = regions.begin(); iter != regions.end(); ++iter)
   {
-    /* read region info default has no data */
-    if (*iter != default_zonegroup_name){
+    if (1 /* || *iter != default_zonegroup_name */) {
       RGWZoneGroup zonegroup(*iter);
+      zonegroup.set_id(*iter);
       int ret = zonegroup.init(cct, this, true, true);
       if (ret < 0) {
        ldout(cct, 0) << "failed init zonegroup: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
@@ -3393,6 +3393,7 @@ int RGWRados::replace_region_with_zonegroup()
       for (map<string, RGWZone>::const_iterator iter = zonegroup.zones.begin(); iter != zonegroup.zones.end();
           iter ++) {
        RGWZoneParams zoneparams(iter->first, iter->first);
+        zoneparams.set_id(iter->first);
        ret = zoneparams.init(cct, this);
        if (ret < 0) {
          ldout(cct, 0) << "failed to init zoneparams  " << iter->first <<  ": " << cpp_strerror(-ret) << dendl;