Repository navigation
RGW - Add POSIX Driver - #52933
RGW - Add POSIX Driver#52933
Conversation
cbodley
left a comment
There was a problem hiding this comment.
a lot to review, but looks wonderful overall
| #if 1 | ||
| // depends on safe_link | ||
| if (! name_hook.is_linked()) { | ||
| // this should not happen! | ||
| abort(); | ||
| } | ||
| #endif |
There was a problem hiding this comment.
the #if seems unnecessary. can we replace that with an assertion?
There was a problem hiding this comment.
well, what I was doing here was a) preferring to use normal_link; but b) have this to print info
There was a problem hiding this comment.
it's an #if iow because I'd like this normally to have normal_link; I can templatize this or something later. I don't want asserts or ceph_asserts in the path. if we're going to change this now, make it normal_link in the decl and just remove this block
| int get_shadow_bucket(const DoutPrefixProvider* dpp, optional_yield y, | ||
| const std::string& ns, const std::string& tenant, | ||
| const std::string& name, bool create, | ||
| std::unique_ptr<POSIXBucket>* shadow); |
There was a problem hiding this comment.
i take it that 'shadow bucket' is a subdirectory that stores the parts for a given multipart upload? sal::Bucket seems like a very wide interface to represent this. i think we should avoid using the sal interfaces to represent things that aren't s3 buckets or objects. what would a minimal 'shadow directory' interface need, if we created an internal class for it instead?
There was a problem hiding this comment.
I did it this way to avoid code duplication.
There was a problem hiding this comment.
understood, but you can share code without sharing the interface. i'm just picturing a class POSIXBucket and class MultipartDirectory that both call helper functions that operate on file descriptors and paths
with this separation, it would be much easier to make changes or bugfixes to one without introducing weird regressions in the other
| - none | ||
| - base | ||
| - d4n | ||
| - posix |
There was a problem hiding this comment.
I don't understand the question? In the future (work Ali is working on) all this will be replaced with JSON stored in the zonegroup, but for now it has to live in ceph.conf.
There was a problem hiding this comment.
i don't think it's necessary to have a posix-file backend for rgw::sal::ConfigStore. rgw_config_store=dbstore already works on a local filesystem
There was a problem hiding this comment.
is "JSON stored in the zonegroup" equivalent to creating a posix-file backend for rgw::sal::ConfigStore? I don't follow
There was a problem hiding this comment.
is "JSON stored in the zonegroup" equivalent to creating a posix-file backend for rgw::sal::ConfigStore? I don't follow
No, it describes the driver stack, so it's a replacement for rgw_backend_store and rgw_filter currently in ceph.conf. The actual zonegroup is stored in the ConfigStore, so whichever ConfigStore you use will store the JSON that describes the driver stack. I agree with Casey, we'll probably use DBStore's ConfigStore for POSIXDriver.
There was a problem hiding this comment.
part of rgw_config_store?
Ah, was the original question asking if this should be in rgw_config_store instead of rgw_filter? If so, then yes, eventually. Currently, POSIXDriver is a filter, since it doesn't implement any User APIs, but instead depends on DBUser. So it has to be a filter stacked on top of DBStore until we finish the User APIs.
f38b739 to
8e44ec3
Compare
|
jenkins test api |
|
This isn't a great run, but it's all valgind and health warns, nothing that could be caused by the (small) refactors that aren't in posixdriver. |
8e44ec3 to
a3f8154
Compare
|
Finally a clean run. Are we good? Or are there other changes to make? |
|
jenkins test windows |
There was a problem hiding this comment.
there should be a add_ceph_unittest() to make this run during 'make check'
cbodley
left a comment
There was a problem hiding this comment.
good to merge once we see unittest_posix_bucket_cache passing in 'make check'
a3f8154 to
e99f00f
Compare
|
Yep, I'm looking at it. |
265527c to
3ff66c7
Compare
This is the MVP for a driver for RGW that operates on top of a POSIX
filesystem. It supports get, put, list, copy, multipart, external
access via the filesystem itself, and ordered bucket listings via an
LRU-based cache.
Note that this is currently a Filter, indended to run on top of dbstore.
This is because it currently doesn't have any User implementation, so it
depends on dbstore's User. Everything else is implemented in
POSIXDriver. Once there is a User implementation, this will become a
Store, instead of a Filter.
Commit messages from bucket listing cache:
rgw/posixdriver: recycle lmdb database handles as required
While LMDB workflows often do not close/return database handles,
ours continually reuses them. This requires us to close each
handle (atomically) when a cache entry is recycled.
rgw/posixdriver: don't instantiate bucket cache entries from notify events
rgw/posixdriver: incorporate lmdb-safe for now
The current inclusion is based on https://github.com/Martchus/lmdb-safe,
which is actively maintained but currently has some packaging issues the
author has agreed to accept fixes for.
For now, skip the submodule to save time and remove an external dependency.
rgw/posixdriver: fix listing of cached, empty bucket
* check lmdb enumeration result in all cases and w/better style
* add unit test for enumeration of an empty cached directory
rgw/posixdriver: nest lmdbs in a directory under the dbroot path to avoid cleanup issues
rgw/posixdriver: refactor for posix integration
* Derive BucketCache types as templates on a SAL driver and SAL
bucket pair.
* Integrate cache fills as callbacks into SAL layer (or mock, for
tests)
* Renaming and cleanups
rgw/posixdriver: add bucket cache implementation and tests
Adds free-standing cache of buckets and object names, with
bucket names (and listing attributes, upcoming) managed in
a hashed set of lmdb databases, which provides ordering and
a high-performance listing cache.
An framework for notification on new object creation (e.g.,
outside S3 workflow) is provided, and a Linux implementation
using inotify.
FindLMDB.cmake taken with attribution and license.
rgw/posixdriver: add zpp_bits serialization (FAST)
Signed-off-by: Daniel Gryniewicz <[email protected]>
Signed-off-by: Ali Maredia <[email protected]>
Signed-off-by: Matt Benjamin <[email protected]>
3ff66c7 to
5258bcb
Compare
|
jenkins test make check |
mattbenjamin
left a comment
There was a problem hiding this comment.
lgtm (mint_listing_entry)
| POSIXObject *pobj; | ||
| int ret; | ||
|
|
||
| ret = get_bucket(nullptr, nullptr, std::string(), bname, &b, null_yield); |
|
yay |
This is the MVP for a driver for RGW that operates on top of a POSIX filesystem. It supports get, put, list, copy, multipart, external access via the filesystem itself, and ordered bucket listings via an LRU-based cache.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows