]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: skip conversion of zones without any zoneparams 14137/head
authorOrit Wasserman <owasserm@redhat.com>
Thu, 9 Mar 2017 11:03:24 +0000 (13:03 +0200)
committerNathan Cutler <ncutler@suse.com>
Sat, 25 Mar 2017 10:35:50 +0000 (11:35 +0100)
Fixes: http://tracker.ceph.com/issues/19231
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
(cherry picked from commit 36cf5a5c8179c6313346b2e29286c537c6fefce8)

src/rgw/rgw_rados.cc

index 1ac4723678c13dc869e309379ba861f909ef0fbd..517a1a8a1c2595be337c9f54a950f00ccc449b5f 100644 (file)
@@ -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();