From: Abhishek Lekshmanan Date: Mon, 8 May 2017 11:38:32 +0000 (+0200) Subject: rgw_rados: create sync module instances only if run_sync_thread is set X-Git-Tag: v12.1.0~10^2~39^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F14994%2Fhead;p=ceph.git rgw_rados: create sync module instances only if run_sync_thread is set This allows for radosgw-admin to run even if there was a misconfiguration in setting tier types which would otherwise make it difficult to revert an invalid tier type setting. Since sync modules are necessary only for rgw and not for the admin itself, this allows for invalid tier configurations to be corrected as rgw-admin wouldn't fail Fixes: http://tracker.ceph.com/issues/19830 Signed-off-by: Abhishek Lekshmanan --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index eb4fbeda6a2a..47191e135354 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -4029,10 +4029,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");