]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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)
committerNathan Cutler <ncutler@suse.com>
Mon, 19 Jun 2017 17:17:54 +0000 (19:17 +0200)
Fixes: http://tracker.ceph.com/issues/18631
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
(cherry picked from commit ac9a7565ddf801121f22476cf3f66668f311833e)

src/rgw/rgw_rados.cc

index 0d36eac67534d962080403d87dc0c9c9a0ea1a09..4291a1361bacfdd9c6aa7ed23829b668c506edac 100644 (file)
@@ -3686,6 +3686,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;