]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: don't include rgw_zone.h in svc_zone.h
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 4 Oct 2018 21:23:26 +0000 (14:23 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 8 Nov 2018 17:19:29 +0000 (09:19 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_file.cc
src/rgw/rgw_log.cc
src/rgw/rgw_orphan.cc
src/rgw/rgw_service.cc
src/rgw/services/svc_sys_obj.cc
src/rgw/services/svc_sys_obj_cache.cc
src/rgw/services/svc_zone.cc
src/rgw/services/svc_zone.h
src/test/rgw/test_rgw_common.h
src/test/rgw/test_rgw_period_history.cc
src/tools/ceph-dencoder/types.h

index 3db89306e69f4f2561a32a017e07244f9e9b7def..a5c50643f1f3c0b857ea28ec9269cd09dd70ea6d 100644 (file)
@@ -23,6 +23,7 @@
 #include "rgw_auth_s3.h"
 #include "rgw_user.h"
 #include "rgw_bucket.h"
+#include "rgw_zone.h"
 #include "rgw_file.h"
 #include "rgw_lib_frontend.h"
 #include "common/errno.h"
index 158843ca0a9dc4a3d237e0264b136fd2b98ea9cf..74b192b91ca938c161bbbc43afe63fc6c7505e15 100644 (file)
@@ -13,6 +13,7 @@
 #include "rgw_rados.h"
 #include "rgw_client_io.h"
 #include "rgw_rest.h"
+#include "rgw_zone.h"
 
 #include "services/svc_zone.h"
 
index 5125cf5f232206aa1e2c5ed03538a8c560bb81ad..87e3e8e4f9752119e47288880a79b6be62a6613e 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "rgw_rados.h"
 #include "rgw_orphan.h"
+#include "rgw_zone.h"
 
 #include "services/svc_zone.h"
 #include "services/svc_sys_obj.h"
index f36554c076fda384fea547eccb0c4904c8f98d72..a39d2714d04cfc44cb61d13b60f17ef377bd30ce 100644 (file)
@@ -32,7 +32,6 @@ int RGWServices_Shared::init(CephContext *cct,
   if (have_cache) {
     sysobj_cache = std::make_shared<RGWSI_SysObj_Cache>(cct);
   }
-
   finisher->init();
   notify->init(zone, rados, finisher);
   rados->init();
index 8008580377f4bca8e0c0de6f7272ce6d537f5dda..7a6969116dc67e6fe6d8f34560f274a1efdbca77 100644 (file)
@@ -3,6 +3,8 @@
 #include "svc_rados.h"
 #include "svc_zone.h"
 
+#include "rgw/rgw_zone.h"
+
 #define dout_subsys ceph_subsys_rgw
 
 RGWSysObjectCtx RGWSI_SysObj::init_obj_ctx()
index 472f2f7366a29897541ef1dcd08587bc2f407b89..9d43480fd17e8356a0c75659197dfc38d0ed3dc1 100644 (file)
@@ -2,6 +2,8 @@
 #include "svc_zone.h"
 #include "svc_notify.h"
 
+#include "rgw/rgw_zone.h"
+
 #define dout_subsys ceph_subsys_rgw
 
 class RGWSI_SysObj_Cache_CB : public RGWSI_Notify::CB
index 63858e0cd1ade03b291e1dbfd9bc36897993cf48..88fc34cb18269591d51ea42ed61e74ada832d08b 100644 (file)
 
 using namespace rgw_zone_defaults;
 
+RGWSI_Zone::RGWSI_Zone(CephContext *cct) : RGWServiceInstance(cct)
+{
+}
+
 void RGWSI_Zone::init(std::shared_ptr<RGWSI_SysObj>& _sysobj_svc,
                       std::shared_ptr<RGWSI_RADOS>& _rados_svc,
                       std::shared_ptr<RGWSI_SyncModules>& _sync_modules_svc)
@@ -21,11 +25,20 @@ void RGWSI_Zone::init(std::shared_ptr<RGWSI_SysObj>& _sysobj_svc,
   rados_svc = _rados_svc;
   sync_modules_svc = _sync_modules_svc;
 
-  realm = make_shared<RGWRealm>();
-  zonegroup = make_shared<RGWZoneGroup>();
-  zone_public_config = make_shared<RGWZone>();
-  zone_params = make_shared<RGWZoneParams>();
-  current_period = make_shared<RGWPeriod>();
+  realm = new RGWRealm();
+  zonegroup = new RGWZoneGroup();
+  zone_public_config = new RGWZone();
+  zone_params = new RGWZoneParams();
+  current_period = new RGWPeriod();
+}
+
+RGWSI_Zone::~RGWSI_Zone()
+{
+  delete realm;
+  delete zonegroup;
+  delete zone_public_config;
+  delete zone_params;
+  delete current_period;
 }
 
 bool RGWSI_Zone::zone_syncs_from(RGWZone& target_zone, RGWZone& source_zone)
index 76f4fac7f97b3ea8f129c8579dddb5fb551fb64e..1c4d720a81c42e37d01677d335b22de23abc94f6 100644 (file)
@@ -3,13 +3,19 @@
 
 
 #include "rgw/rgw_service.h"
-#include "rgw/rgw_zone.h"
 
 
 class RGWSI_RADOS;
 class RGWSI_SysObj;
 class RGWSI_SyncModules;
 
+class RGWRealm;
+class RGWZoneGroup;
+class RGWZone;
+class RGWZoneParams;
+class RGWPeriod;
+class RGWZonePlacementInfo;
+
 class RGWRESTConn;
 
 class RGWSI_Zone : public RGWServiceInstance
@@ -20,11 +26,11 @@ class RGWSI_Zone : public RGWServiceInstance
   std::shared_ptr<RGWSI_RADOS> rados_svc;
   std::shared_ptr<RGWSI_SyncModules> sync_modules_svc;
 
-  std::shared_ptr<RGWRealm> realm;
-  std::shared_ptr<RGWZoneGroup> zonegroup;
-  std::shared_ptr<RGWZone> zone_public_config; /* external zone params, e.g., entrypoints, log flags, etc. */  
-  std::shared_ptr<RGWZoneParams> zone_params; /* internal zone params, e.g., rados pools */
-  std::shared_ptr<RGWPeriod> current_period;
+  RGWRealm *realm{nullptr};
+  RGWZoneGroup *zonegroup{nullptr};
+  RGWZone *zone_public_config{nullptr}; /* external zone params, e.g., entrypoints, log flags, etc. */  
+  RGWZoneParams *zone_params{nullptr}; /* internal zone params, e.g., rados pools */
+  RGWPeriod *current_period{nullptr};
   uint32_t zone_short_id{0};
   bool writeable_zone{false};
 
@@ -50,7 +56,8 @@ class RGWSI_Zone : public RGWServiceInstance
 
   int update_placement_map();
 public:
-  RGWSI_Zone(CephContext *cct): RGWServiceInstance(cct) {}
+  RGWSI_Zone(CephContext *cct);
+  ~RGWSI_Zone();
 
   RGWZoneParams& get_zone_params();
   RGWPeriod& get_current_period();
index 029dadb6adc0b52a46ce716d2304d3c492a61bdb..0fc4d5f4e2abd976d0c284663aabbc3f1c18b00b 100644 (file)
@@ -16,6 +16,7 @@
 #include "common/Formatter.h"
 #include "rgw/rgw_common.h"
 #include "rgw/rgw_rados.h"
+#include "rgw/rgw_zone.h"
 
 #ifndef CEPH_TEST_RGW_COMMON_H
 #define CEPH_TEST_RGW_COMMON_H
index 46519d8438558677bb247515d97f3a60338f5d9f..27ea062949356ea820aa3835d79d90b04c250ccb 100644 (file)
@@ -13,6 +13,7 @@
  */
 #include "rgw/rgw_period_history.h"
 #include "rgw/rgw_rados.h"
+#include "rgw/rgw_zone.h"
 #include "global/global_init.h"
 #include "common/ceph_argparse.h"
 #include <boost/lexical_cast.hpp>
index b782e221a1bb35c16e5a8d628f936215f8de7ddf..31770de3a5bb6a5bae711666ddb44ca353a43aa2 100644 (file)
@@ -341,6 +341,8 @@ TYPE(rbd::mirror::image_map::PolicyData)
 TYPE(RGWOLHInfo)
 TYPE(RGWObjManifestPart)
 TYPE(RGWObjManifest)
+
+#include "rgw/rgw_zone.h"
 TYPE(RGWZoneParams)
 TYPE(RGWZone)
 TYPE(RGWZoneGroup)