bci.info.bucket.name = bucket_name;
bci.info.bucket.bucket_id = bucket_instance;
bci.info.bucket.tenant = tenant_name;
- ret = bihandler->svc.zone->select_bucket_location_by_rule(bci.info.placement_rule, &rule_info);
- if (ret < 0) {
- ldout(cct, 0) << "ERROR: select_bucket_placement() returned " << ret << dendl;
- return ret;
+ // if the sync module never writes data, don't require the zone to specify all placement targets
+ if (bihandler->svc.zone->sync_module_supports_writes()) {
+ ret = bihandler->svc.zone->select_bucket_location_by_rule(bci.info.placement_rule, &rule_info);
+ if (ret < 0) {
+ ldout(cct, 0) << "ERROR: select_bucket_placement() returned " << ret << dendl;
+ return ret;
+ }
}
bci.info.index_type = rule_info.index_type;
} else {
return writeable_zone && !get_zone().is_read_only();
}
+bool RGWSI_Zone::sync_module_supports_writes() const
+{
+ return writeable_zone;
+}
+
uint32_t RGWSI_Zone::get_zone_short_id() const
{
return zone_short_id;
bool zone_is_writeable();
bool zone_syncs_from(const RGWZone& target_zone, const RGWZone& source_zone) const;
bool get_redirect_zone_endpoint(string *endpoint);
+ bool sync_module_supports_writes() const;
RGWRESTConn *get_master_conn() {
return rest_master_conn;