If a zone is set up with sync_from_all=false, the bucket sync status
command will incorrectly report "not in sync_from" because it's calling
'zone.syncs_from(source.id)', where syncs_from() expects a zone name
instead of id
Fixes: http://tracker.ceph.com/issues/40022
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
9da888686c3a8880976cd604bdafc4361068c985)
Conflicts:
src/rgw/rgw_zone.h
- in mimic, this code is in src/rgw/rgw_rados.h - made the change there instead
out << indented{width, "source zone"} << source.id << " (" << source.name << ")\n";
// syncing from this zone?
- if (!zone.syncs_from(source.id)) {
+ if (!zone.syncs_from(source.name)) {
out << indented{width} << "not in sync_from\n";
return 0;
}
bool is_read_only() { return read_only; }
- bool syncs_from(const string& zone_id) const {
- return (sync_from_all || sync_from.find(zone_id) != sync_from.end());
+ bool syncs_from(const string& zone_name) const {
+ return (sync_from_all || sync_from.find(zone_name) != sync_from.end());
}
};
WRITE_CLASS_ENCODER(RGWZone)