From: Orit Wasserman Date: Thu, 9 Mar 2017 11:03:24 +0000 (+0200) Subject: rgw: skip conversion of zones without any zoneparams X-Git-Tag: v12.0.1~85^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F13900%2Fhead;p=ceph.git rgw: skip conversion of zones without any zoneparams Fixes: http://tracker.ceph.com/issues/19231 Signed-off-by: Orit Wasserman --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 5a779b2377c4..63873454c540 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -3618,9 +3618,12 @@ int RGWRados::replace_region_with_zonegroup() zoneparams.set_id(iter->first); zoneparams.realm_id = realm.get_id(); ret = zoneparams.init(cct, this); - if (ret < 0) { + if (ret < 0 && ret != -ENOENT) { ldout(cct, 0) << __func__ << " failed to init zoneparams " << iter->first << ": " << cpp_strerror(-ret) << dendl; return ret; + } else if (ret == -ENOENT) { + ldout(cct, 0) << __func__ << " zone is part of another cluster " << iter->first << " skipping " << dendl; + continue; } zonegroup.realm_id = realm.get_id(); ret = zoneparams.update();