From acfd4dc1d80c7a1028fe2442078fdd60d9dd4e15 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Mon, 10 Feb 2020 16:59:35 -0500 Subject: [PATCH] rgw: data_sync_source_zones only contains 'exporting' zones RGWRados spawns a RGWDataSyncProcessorThread for each zone in data_sync_source_zones, but these threads would fail to initialize with ENOTSUP, and RGWOp_DATALog_Status would crash calling into an uninitialized RGWDataSyncStatusManager Fixes: https://tracker.ceph.com/issues/44068 Signed-off-by: Casey Bodley --- src/rgw/services/svc_zone.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rgw/services/svc_zone.cc b/src/rgw/services/svc_zone.cc index 770cf983849..db44bc192fd 100644 --- a/src/rgw/services/svc_zone.cc +++ b/src/rgw/services/svc_zone.cc @@ -194,8 +194,9 @@ int RGWSI_Zone::do_start() return ret; } + auto sync_modules = sync_modules_svc->get_manager(); RGWSyncModuleRef sm; - if (!sync_modules_svc->get_manager()->get_module(zone_public_config->tier_type, &sm)) { + if (!sync_modules->get_module(zone_public_config->tier_type, &sm)) { lderr(cct) << "ERROR: tier type not found: " << zone_public_config->tier_type << dendl; return -EINVAL; } @@ -232,7 +233,7 @@ int RGWSI_Zone::do_start() bool zone_is_target = target_zones.find(z.id) != target_zones.end(); if (zone_is_source || zone_is_target) { - if (zone_is_source) { + if (zone_is_source && sync_modules->supports_data_export(z.tier_type)) { data_sync_source_zones.push_back(&z); } if (zone_is_target) { -- 2.39.5