Skip to content

rgw: Make Neorados Available - #51084

Closed
adamemerson wants to merge 46 commits into
ceph:wip-coro-after-reeffrom
adamemerson:wip-rgw-neorados-radosdriver
Closed

adamemerson wants to merge 46 commits into
ceph:wip-coro-after-reeffrom
adamemerson:wip-rgw-neorados-radosdriver

Conversation

@adamemerson

@adamemerson adamemerson commented Apr 14, 2023 •

Copy link
Copy Markdown
Contributor

Plumb io_context into RadosDriver so a Neorados handle can use it.

Make AsioFrontend share the same io_context as the rest of RGW.

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • 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 cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

adamemerson and others added 30 commits April 4, 2023 14:14
Since we'll be iterating quickly, let them have the current
semi-stable-ish version. They can switch back to the main line version
after it settles down a bit.

Signed-off-by: Adam C. Emerson <[email protected]>
Previously we had versions of all the calls that took an int64_t and
optional key and namespace.

This didn't really offer much benefit and doubled the maintenance
burden for changing anything.

As such just make the IOContext constructor non-explicit, and make all
its mutators return the same IOContext so people can supply them
builder-style if they want to.

Also don't wrap things in 'optional' when the underlying library
doesn't. The callers just end up having to wrap and unwrap with
value-or repeatedly.

Signed-off-by: Adam C. Emerson <[email protected]>
This form of completion handling is compatible with C++20 Completions
and generally more flexible stuff.

Signed-off-by: Adam C. Emerson <[email protected]>
The lock will continue to be held over the 'dispatch' with C++20
coroutines.

Signed-off-by: Adam C. Emerson <[email protected]>
Apparently in some cases we were using references to objects on the
caller stack that happen to no longer exist if the caller's stack goes
away.

C++20 Coroutines tickled this bug.

Signed-off-by: Adam C. Emerson <[email protected]>
Use `min` rather than `max` when deciding how much we need to read in
`read()`.

Signed-off-by: Adam C. Emerson <[email protected]>
Just as a demonstration to see how well they work and how to put
things together with them.

Signed-off-by: Adam C. Emerson <[email protected]>
Needed to fix coroutine detection under Clang

TODO: update boost package sha1 in install-deps.sh when we have
packages uploaded

Signed-off-by: Adam C. Emerson <[email protected]>
In the `destroy_` functions of `CompletionImpl` we were getting the
associated allocator after moving out of the handler into the call to
`bind_and_forward`. This was triggering a crash on null-pointer access
in operations made with `co_composed`.

Signed-off-by: Adam C. Emerson <[email protected]>
Since reading CLS values in a friendly way requires calling out to RADOS
then decoding the returned structure, make a function to help with that.

Signed-off-by: Adam C. Emerson <[email protected]>
Google Test does not support C++ coroutines, so kludge together a test
harness that supports coroutines reasonably well.

Also add a couple utility functions.

Signed-off-by: Adam C. Emerson <[email protected]>
We should not be using std::list everywhere, and this is an excellent
time to switch.

Signed-off-by: Adam C. Emerson <[email protected]>
Signed-off-by: Adam C. Emerson <[email protected]>
If our decoder function returns a tuple of multiple values, flatten it
so our signature is `void(error_code, T, U, V)` not
`void(error_code, std::tuple<T, U, V>)`.

Signed-off-by: Adam C. Emerson <[email protected]>
And return them to the client by setting the error cod and result in
the vector and returning an error from the operation as a whole.

Signed-off-by: Adam C. Emerson <[email protected]>
Since they can be reported now, report them

Signed-off-by: Adam C. Emerson <[email protected]>
@adamemerson
adamemerson force-pushed the wip-rgw-neorados-radosdriver branch from b4466dd to 6eeb2f0 Compare April 26, 2023 17:23

@cbodley cbodley 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.

looks great, but i'd like to find a way to exercise the frontend shutdown path. can you try to do some smoke testing with killall radosgw while a workload like warp or s3tests is running?

@adamemerson
adamemerson requested a review from cbodley April 26, 2023 17:39
Comment thread src/rgw/rgw_asio_frontend.cc Outdated
Comment on lines 1136 to 1137

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.

does the frontend still need the io_context_pool, now that AppMain handles the shutdown? it looks like this could just take a reference to io_context

@adamemerson
adamemerson force-pushed the wip-rgw-neorados-radosdriver branch from 6eeb2f0 to 534a944 Compare April 28, 2023 16:56
Pull the `io_context` and threads out of `AsioFrontend`, pass in a
reference to `io_context_pool` so it can be shut down at `AsioFrontend::join`

Signed-off-by: Adam C. Emerson <[email protected]>
@adamemerson
adamemerson force-pushed the wip-rgw-neorados-radosdriver branch from 534a944 to 2f03efc Compare April 28, 2023 17:35
@adamemerson

Copy link
Copy Markdown
Contributor Author

looks great, but i'd like to find a way to exercise the frontend shutdown path. can you try to do some smoke testing with killall radosgw while a workload like warp or s3tests is running?

Ran a half hour warp with a restart of radosgw every second and shutdown seems to work fine. I moved the thread shutdown to just before closing the driver, and this seems to make everything happy.

@adamemerson
adamemerson requested a review from cbodley April 28, 2023 18:03
@cbodley

cbodley commented May 1, 2023

Copy link
Copy Markdown
Contributor

jenkins test make check

@cbodley

cbodley commented May 3, 2023

Copy link
Copy Markdown
Contributor

odd failure from 'make check':

E: Unable to locate package ceph-libboost-atomic1.81-dev

@yuriw

yuriw commented May 10, 2023

Copy link
Copy Markdown
Contributor

@adamemerson @cbodley pls push it to reef

@cbodley cbodley removed this from the reef milestone May 10, 2023
@adamemerson
adamemerson force-pushed the wip-coro-after-reef branch from bd1de90 to ecb46f1 Compare May 22, 2023 17:50
@adamemerson
adamemerson requested review from a team as code owners May 22, 2023 17:50
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@adamemerson
adamemerson force-pushed the wip-coro-after-reef branch from ecb46f1 to 42f22d8 Compare May 31, 2023 00:32
@adamemerson
adamemerson force-pushed the wip-coro-after-reef branch 2 times, most recently from 6790e11 to 39ded6d Compare June 22, 2023 19:54
@adamemerson

Copy link
Copy Markdown
Contributor Author

This is included in #49976

@adamemerson
adamemerson deleted the wip-rgw-neorados-radosdriver branch June 22, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants