From: Yehuda Sadeh Date: Tue, 26 Apr 2016 18:31:43 +0000 (-0700) Subject: rgw: upgrade default zonegroup and set correct zone[group] id X-Git-Tag: v10.2.1~41^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a8b800b903f0f1144efe0cf3568b02b3e200c3b2;p=ceph.git rgw: upgrade default zonegroup and set correct zone[group] id Fixes: http://tracker.ceph.com/issues/15597 Signed-off-by: Yehuda Sadeh (cherry picked from commit 27806c71922eef2f4cde360d7ba40dee9d5bd4bd) --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 47ba96261c17..f7e24197f75d 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -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::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;