mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
Merge pull request #20611 from Leeshine/wip-rgw-22080-1
rgw: create sync-module instance when radosgw-admin sync run Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
commit
a3aa4d5b88
@ -6523,17 +6523,9 @@ next:
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
RGWSyncModuleInstanceRef sync_module;
|
||||
int ret = store->get_sync_modules_manager()->create_instance(g_ceph_context, store->get_zone().tier_type,
|
||||
store->get_zone_params().tier_config, &sync_module);
|
||||
if (ret < 0) {
|
||||
lderr(cct) << "ERROR: failed to init sync module instance, ret=" << ret << dendl;
|
||||
return ret;
|
||||
}
|
||||
RGWDataSyncStatusManager sync(store, store->get_async_rados(), source_zone);
|
||||
|
||||
RGWDataSyncStatusManager sync(store, store->get_async_rados(), source_zone, sync_module);
|
||||
|
||||
ret = sync.init();
|
||||
int ret = sync.init();
|
||||
if (ret < 0) {
|
||||
cerr << "ERROR: sync.init() returned ret=" << ret << std::endl;
|
||||
return -ret;
|
||||
@ -6551,9 +6543,18 @@ next:
|
||||
cerr << "ERROR: source zone not specified" << std::endl;
|
||||
return EINVAL;
|
||||
}
|
||||
RGWDataSyncStatusManager sync(store, store->get_async_rados(), source_zone);
|
||||
|
||||
int ret = sync.init();
|
||||
RGWSyncModuleInstanceRef sync_module;
|
||||
int ret = store->get_sync_modules_manager()->create_instance(g_ceph_context, store->get_zone().tier_type,
|
||||
store->get_zone_params().tier_config, &sync_module);
|
||||
if (ret < 0) {
|
||||
lderr(cct) << "ERROR: failed to init sync module instance, ret=" << ret << dendl;
|
||||
return ret;
|
||||
}
|
||||
|
||||
RGWDataSyncStatusManager sync(store, store->get_async_rados(), source_zone, sync_module);
|
||||
|
||||
ret = sync.init();
|
||||
if (ret < 0) {
|
||||
cerr << "ERROR: sync.init() returned ret=" << ret << std::endl;
|
||||
return -ret;
|
||||
|
Loading…
Reference in New Issue
Block a user