Skip to content

Commit 74a74b1

Browse files
committed
RGW - Standalone - Enable building without librados
The next pass in standalone RGW is to build without librados. This results in an radosgw that only links against libcommon. Signed-off-by: Daniel Gryniewicz <[email protected]>
1 parent d87e905 commit 74a74b1

File tree

99 files changed

+289
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+289
-276
lines changed

src/rgw/CMakeLists.txt

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ set(librgw_common_srcs
8282
rgw_period_puller.cc
8383
rgw_s3_filter.cc
8484
rgw_pubsub.cc
85-
rgw_coroutine.cc
8685
rgw_cr_rest.cc
8786
rgw_op.cc
8887
rgw_policy_s3.cc
@@ -166,7 +165,6 @@ if(WITH_RADOSGW_RADOS)
166165
services/svc_sys_obj.cc
167166
services/svc_sys_obj_cache.cc
168167
services/svc_sys_obj_core.cc
169-
services/svc_tier_rados.cc
170168
services/svc_user.cc
171169
services/svc_user_rados.cc
172170
services/svc_zone.cc
@@ -235,7 +233,9 @@ if(WITH_RADOSGW_RADOS)
235233
driver/rados/rgw_dedup_table.cc
236234
driver/rados/rgw_dedup_store.cc
237235
driver/rados/rgw_dedup_utils.cc
238-
driver/rados/rgw_dedup_cluster.cc)
236+
driver/rados/rgw_dedup_cluster.cc
237+
rgw_coroutine.cc
238+
)
239239
endif()
240240
if(WITH_RADOSGW_AMQP_ENDPOINT)
241241
list(APPEND librgw_common_srcs rgw_amqp.cc)
@@ -295,19 +295,7 @@ target_link_libraries(rgw_common
295295
PRIVATE
296296
legacy-option-headers
297297
global
298-
cls_2pc_queue_client
299-
cls_cmpomap_client
300-
cls_lock_client
301-
cls_log_client
302-
cls_otp_client
303-
cls_refcount_client
304298
cls_rgw_client
305-
cls_rgw_gc_client
306-
cls_timeindex_client
307-
cls_user_client
308-
cls_version_client
309-
librados
310-
libneorados
311299
rt
312300
ICU::uc
313301
OATH::OATH
@@ -367,6 +355,23 @@ if(WITH_JAEGER)
367355
target_link_libraries(rgw_common PUBLIC jaeger_base)
368356
endif()
369357

358+
if(WITH_RADOSGW_RADOS)
359+
target_link_libraries(rgw_common PRIVATE
360+
cls_2pc_queue_client
361+
cls_cmpomap_client
362+
cls_lock_client
363+
cls_log_client
364+
cls_otp_client
365+
cls_refcount_client
366+
cls_rgw_gc_client
367+
cls_timeindex_client
368+
cls_user_client
369+
cls_version_client
370+
librados
371+
libneorados
372+
)
373+
endif()
374+
370375
if(WITH_RADOSGW_DBSTORE)
371376
target_link_libraries(rgw_common PRIVATE global dbstore)
372377
endif()
@@ -405,7 +410,6 @@ set(rgw_a_srcs
405410
rgw_lua_request.cc
406411
rgw_opa.cc
407412
rgw_os_lib.cc
408-
rgw_period_pusher.cc
409413
rgw_process.cc
410414
rgw_realm_reloader.cc
411415
rgw_rest_config.cc
@@ -421,9 +425,12 @@ set(rgw_a_srcs
421425
rgw_sts.cc)
422426

423427
if(WITH_RADOSGW_RADOS)
424-
list(APPEND rgw_a_srcs driver/rados/rgw_rest_bucket.cc
428+
list(APPEND rgw_a_srcs
429+
driver/rados/rgw_rest_bucket.cc
425430
driver/rados/rgw_rest_log.cc
426-
driver/rados/rgw_rest_realm.cc)
431+
driver/rados/rgw_rest_realm.cc
432+
rgw_period_pusher.cc
433+
)
427434
endif()
428435

429436
gperf_generate(${CMAKE_SOURCE_DIR}/src/rgw/rgw_iam_policy_keywords.gperf

src/rgw/driver/rados/rgw_rados.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#include "rgw_worker.h"
5959
#include "rgw_notify.h"
6060
#include "rgw_http_errors.h"
61+
#include "rgw_multipart_meta_filter.h"
6162

6263
#undef fork // fails to compile RGWPeriod::fork() below
6364

src/rgw/driver/rados/rgw_rados.h

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -70,29 +70,6 @@ struct get_obj_data;
7070
#define PUT_OBJ_EXCL 0x02
7171
#define PUT_OBJ_CREATE_EXCL (PUT_OBJ_CREATE | PUT_OBJ_EXCL)
7272

73-
static inline void prepend_bucket_marker(const rgw_bucket& bucket, const std::string& orig_oid, std::string& oid)
74-
{
75-
if (bucket.marker.empty() || orig_oid.empty()) {
76-
oid = orig_oid;
77-
} else {
78-
oid = bucket.marker;
79-
oid.append("_");
80-
oid.append(orig_oid);
81-
}
82-
}
83-
84-
static inline void get_obj_bucket_and_oid_loc(const rgw_obj& obj, std::string& oid, std::string& locator)
85-
{
86-
const rgw_bucket& bucket = obj.bucket;
87-
prepend_bucket_marker(bucket, obj.get_oid(), oid);
88-
const std::string& loc = obj.key.get_loc();
89-
if (!loc.empty()) {
90-
prepend_bucket_marker(bucket, loc, locator);
91-
} else {
92-
locator.clear();
93-
}
94-
}
95-
9673
struct RGWOLHInfo {
9774
rgw_obj target;
9875
bool removed;

src/rgw/driver/rados/rgw_sal_rados.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
#include "rgw_tracer.h"
6565
#include "rgw_zone.h"
6666
#include "rgw_restore.h"
67+
#include "rgw_multipart_meta_filter.h"
6768

6869
#include "services/svc_bilog_rados.h"
6970
#include "services/svc_bi_rados.h"

src/rgw/driver/rados/rgw_sync.cc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,17 @@ class RGWListRemoteMDLogCR : public RGWShardCollectCR {
239239
bool spawn_next() override;
240240
};
241241

242+
RGWRemoteMetaLog::~RGWRemoteMetaLog()
243+
{
244+
delete error_logger;
245+
}
246+
247+
void RGWRemoteMetaLog::finish()
248+
{
249+
going_down = true;
250+
stop();
251+
}
252+
242253
int RGWRemoteMetaLog::read_log_info(const DoutPrefixProvider *dpp, rgw_mdlog_info *log_info)
243254
{
244255
rgw_http_param_pair pairs[] = { { "type", "metadata" },
@@ -298,6 +309,18 @@ int RGWRemoteMetaLog::init()
298309
return 0;
299310
}
300311

312+
RGWMetaSyncStatusManager::~RGWMetaSyncStatusManager(){}
313+
314+
std::ostream& RGWMetaSyncStatusManager::gen_prefix(std::ostream& out) const
315+
{
316+
return out << "meta sync: ";
317+
}
318+
319+
unsigned RGWMetaSyncStatusManager::get_subsys() const
320+
{
321+
return dout_subsys;
322+
}
323+
301324
#define CLONE_MAX_ENTRIES 100
302325

303326
int RGWMetaSyncStatusManager::init(const DoutPrefixProvider *dpp)

src/rgw/driver/rados/rgw_tools.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "rgw_aio_throttle.h"
1515
#include "rgw_asio_thread.h"
1616
#include "rgw_compression.h"
17+
#include "services/svc_sys_obj.h"
1718

1819
#define dout_subsys ceph_subsys_rgw
1920

src/rgw/rgw_acl.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include "rgw_acl.h"
1515
#include "rgw_acl_s3.h"
16-
#include "rgw_user.h"
16+
#include "rgw_auth.h"
1717

1818
#define dout_subsys ceph_subsys_rgw
1919

src/rgw/rgw_acl_s3.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "common/split.h"
1111

1212
#include "rgw_acl_s3.h"
13-
#include "rgw_user.h"
13+
#include "driver/rados/rgw_user.h"
1414
#include "rgw_sal.h"
1515

1616
#define dout_subsys ceph_subsys_rgw

src/rgw/rgw_acl_swift.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "common/ceph_json.h"
1212
#include "common/split.h"
1313
#include "rgw_common.h"
14-
#include "rgw_user.h"
14+
#include "driver/rados/rgw_user.h"
1515
#include "rgw_acl_swift.h"
1616
#include "rgw_sal.h"
1717

0 commit comments

Comments
 (0)