]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: we need to reinit the zonegroup after assignment to avoid invalid cct and store
authorOrit Wasserman <owasserm@redhat.com>
Sun, 22 Jan 2017 12:42:14 +0000 (14:42 +0200)
committerOrit Wasserman <owasserm@redhat.com>
Thu, 26 Jan 2017 17:45:40 +0000 (19:45 +0200)
Fixes: http://tracker.ceph.com/issues/18631
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
src/rgw/rgw_rados.cc

index 8757baf1c57864a34744a161cb9b38949fc3e614..ff7f0ad56e6eee6268ccc8fc324bda5ea239055a 100644 (file)
@@ -3680,6 +3680,11 @@ int RGWRados::init_zg_from_period(bool *initialized)
   if (iter != current_period.get_map().zonegroups.end()) {
     ldout(cct, 20) << "using current period zonegroup " << zonegroup.get_name() << dendl;
     zonegroup = iter->second;
+    ret = zonegroup.init(cct, this, false);
+    if (ret < 0) {
+      ldout(cct, 0) << "failed init zonegroup: " << " " << cpp_strerror(-ret) << dendl;
+      return ret;
+    }
     ret = zone_params.init(cct, this);
     if (ret < 0 && ret != -ENOENT) {
       ldout(cct, 0) << "failed reading zone params info: " << " " << cpp_strerror(-ret) << dendl;