From c56a3134ebe1b531af09b19214a16b37e0e8a6d8 Mon Sep 17 00:00:00 2001 From: Orit Wasserman Date: Thu, 9 Mar 2017 13:03:24 +0200 Subject: [PATCH] rgw: skip conversion of zones without any zoneparams Fixes: http://tracker.ceph.com/issues/19231 Signed-off-by: Orit Wasserman (cherry picked from commit 36cf5a5c8179c6313346b2e29286c537c6fefce8) --- src/rgw/rgw_rados.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 1ac4723678c..517a1a8a1c2 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -3583,9 +3583,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(); -- 2.47.3