]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/services/svc_sync_modules.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab ft=cpp
4 #include "svc_sync_modules.h"
7 #include "rgw/rgw_sync_module.h"
8 #include "rgw/rgw_zone.h"
10 #define dout_subsys ceph_subsys_rgw
12 void RGWSI_SyncModules::init(RGWSI_Zone
*zone_svc
)
15 sync_modules_manager
= new RGWSyncModulesManager();
16 rgw_register_sync_modules(sync_modules_manager
);
19 int RGWSI_SyncModules::do_start()
21 auto& zone_public_config
= svc
.zone
->get_zone();
23 int ret
= sync_modules_manager
->create_instance(cct
, zone_public_config
.tier_type
, svc
.zone
->get_zone_params().tier_config
, &sync_module
);
25 lderr(cct
) << "ERROR: failed to start sync module instance, ret=" << ret
<< dendl
;
27 lderr(cct
) << "ERROR: " << zone_public_config
.tier_type
28 << " sync module does not exist. valid sync modules: "
29 << sync_modules_manager
->get_registered_module_names()
35 ldout(cct
, 20) << "started sync module instance, tier type = " << zone_public_config
.tier_type
<< dendl
;
40 RGWSI_SyncModules::~RGWSI_SyncModules()
42 delete sync_modules_manager
;