rgw: skip conversion of zones without any zoneparams

Fixes: http://tracker.ceph.com/issues/19231
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
This commit is contained in:
Orit Wasserman 2017-03-09 13:03:24 +02:00
parent e9f3bf8eab
commit 36cf5a5c81

View File

@ -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();