]> git.apps.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)
committerAlexey Sheplyakov <asheplyakov@mirantis.com>
Mon, 6 Feb 2017 12:51:11 +0000 (16:51 +0400)
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 30bd72a00ccc3f972384c11ca890fc5627acca31..9225613fa94ea7e89577a4e1bf4eff49ab48ff7e 100644 (file)
@@ -3583,6 +3583,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;