Skip to content

Commit

Permalink
Merge pull request #14994 from theanalyst/f/tier-fix
Browse files Browse the repository at this point in the history
rgw_rados: create sync module instances only if run_sync_thread is set

Reviewed-by: Casey Bodley <cbodley@redhat.com>
  • Loading branch information
cbodley committed May 19, 2017
2 parents e7e7e94 + e46fc50 commit e01fd68
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/rgw/rgw_rados.cc
Expand Up @@ -4075,10 +4075,12 @@ int RGWRados::init_complete()

zone_short_id = current_period.get_map().get_zone_short_id(zone_params.get_id());

ret = sync_modules_manager->create_instance(cct, zone_public_config.tier_type, zone_params.tier_config, &sync_module);
if (ret < 0) {
lderr(cct) << "ERROR: failed to init sync module instance, ret=" << ret << dendl;
return ret;
if (run_sync_thread) {
ret = sync_modules_manager->create_instance(cct, zone_public_config.tier_type, zone_params.tier_config, &sync_module);
if (ret < 0) {
lderr(cct) << "ERROR: failed to init sync module instance, ret=" << ret << dendl;
return ret;
}
}

writeable_zone = (zone_public_config.tier_type.empty() || zone_public_config.tier_type == "rgw");
Expand Down

0 comments on commit e01fd68

Please sign in to comment.