Skip to content

rgw: build radosgw daemon as a shared lib + small executable - #32404

Merged
dang merged 3 commits into
ceph:masterfrom
kalebskeithley:master
Jan 7, 2020
Merged

dang merged 3 commits into
ceph:masterfrom
kalebskeithley:master

Conversation

@kalebskeithley

@kalebskeithley kalebskeithley commented Dec 23, 2019 •

Copy link
Copy Markdown
Contributor

rgw: radosgw (rgw) daemon as a shared lib

Majority of radosgw is contained in libradosgw.so. (/usr)/bin/radosgw
is now a few lines that calls radosgw_Main() in libradosgw.so.

The "zipper" work to modularize storage back-ends that will require
linking to the shared library to resolve the methods that they reference.

Putting the bulk of the implementation in a shared lib also allows for
unit testing to link with the shared lib for testing.

radosgw_Main() is the C++ implementation. For C linkage, radosgw_main()
is provided.

https://tracker.ceph.com/issues/43411

Signed-off-by: Kaleb S. KEITHLEY [email protected]

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

Majority of radosgw is contained in libradosgw.so. (/usr)/bin/radosgw
is now a few lines that calls radosgw_Main() in libradosgw.so.

The "zipper" work to modularize storage back-ends that will require
linking to the shared library to resolve the methods that they reference.

Putting the bulk of the implementation in a shared lib also allows for
unit testing to link with the shared lib for testing.

radosgw_Main() is the C++ implementation. For C linkage, radosgw_main()
is provided.

Signed-off-by: Kaleb S. KEITHLEY <[email protected]>
Majority of radosgw is contained in libradosgw.so. (/usr)/bin/radosgw
is now a few lines that calls radosgw_Main() in libradosgw.so.

The "zipper" work to modularize storage back-ends that will require
linking to the shared library to resolve the methods that they reference.

Putting the bulk of the implementation in a shared lib also allows for
unit testing to link with the shared lib for testing.

radosgw_Main() is the C++ implementation. For C linkage, radosgw_main()
is provided.

Signed-off-by: Kaleb S. KEITHLEY <[email protected]>
@liewegas

Copy link
Copy Markdown
Member

👍 I wonder if this could be extended to include some or all of the radosgw-admin tools so that that functionality could be linked/loaded directly into ceph-mgr? One long term goal is to unify/migrate the radosgw-admin CLI to the ceph CLI/API (e.g., ceph rgw ...) where it can be readily accessed by the dashboard code.

@kalebskeithley

Copy link
Copy Markdown
Contributor Author

+1 I wonder if this could be extended to include some or all of the radosgw-admin tools so that that functionality could be linked/loaded directly into ceph-mgr? One long term goal is to unify/migrate the radosgw-admin CLI to the ceph CLI/API (e.g., ceph rgw ...) where it can be readily accessed by the dashboard code.

I presume you mean converting radosgw-admin tools to shlibs + a thin wrapper executable. (And not linking the tools to the new libradosgw.so.)

It certainly could be done. It'd be a separate project. I wouldn't tightly couple it to this.

@liewegas liewegas added the rgw label Dec 23, 2019
@kalebskeithley kalebskeithley self-assigned this Dec 23, 2019
@kalebskeithley
kalebskeithley requested review from cbodley, dang and mattbenjamin and removed request for dang and mattbenjamin December 23, 2019 20:48

@mattbenjamin mattbenjamin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems sane--what's up with the merge commit?

@kalebskeithley

Copy link
Copy Markdown
Contributor Author

seems sane--what's up with the merge commit?

dunno. Where do you see that? I just did what I thought was a normal PR

@dang
dang merged commit 2ee55c2 into ceph:master Jan 7, 2020
@tchaikov

tchaikov commented Jan 8, 2020

Copy link
Copy Markdown
Contributor

@kalebskeithley @dang please avoid adding merge commit in a PR in future.

also, this change changes how we do packaging. ideally, we should at least test it by pushing it to ceph-ci first. this change actually broke the build on bionic since it got merged. see https://shaman.ceph.com/builds/ceph/master/2ee55c2cf775cd4b59a351e3ad4d76ab1c46f669/default/182297/

Comment thread src/rgw/CMakeLists.txt
target_link_libraries(rgw_schedulers
PUBLIC dmclock::dmclock)

add_executable(radosgw rgw_main.cc)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this broke dashboard related tests. fixed by #32564

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants