From 27806c71922eef2f4cde360d7ba40dee9d5bd4bd Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 26 Apr 2016 11:31:43 -0700 Subject: [PATCH] rgw: upgrade default zonegroup and set correct zone[group] id Fixes: http://tracker.ceph.com/issues/15597 Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_rados.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 6b4ece733c9a..f37aa794b897 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; -- 2.47.3