summaryrefslogtreecommitdiffstats
path: root/src/rgw/driver/daos/rgw_sal_daos.cc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* rgw: respect location constraint in master zonegroupSeena Fallah2024-12-191-2/+0
| | | | | | | | | | When creating a bucket with a location constraint specified by the user, this constraint is not included in createparams. Therefore, to create the bucket in the requested location, createparams and bucket_zonegroup must be replaced with the user-provided values. Fixes: https://tracker.ceph.com/issues/62309 Signed-off-by: Seena Fallah <seenafallah@gmail.com>
* rgw/cloudtier: Restore object from cloud endpointSoumya Koduri2024-10-031-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1)Add functionality to restore cloud-transitioned objects on demand. Current commit has below - * Given <bucket,object>, fetch the object from the cloud endpoint. * if days provided and > 0, the restore is marked temporary with expiry date. * Without <days>, it is marked as permanent restore. 2)Use ObjectExpirer/delete_at attr to delete temp objects For temporarily restored objects, set delete_at attr to the expiration time. This will add those objects to ObjectExpirer list. Use LC worker thread to scan that list and delete expired objects. By delete here, it means to delete restored object data and reset HEAD object as Cloud-transitioned object as it was before restore. In addition below changes are done - * If temporary, object is still marked RGWObj::CloudTiered and mtime is set same as transition time. * If permanent, object is marked RGWObj::Main and mtime is set to restore time (now()). * rgw_restore_debug_interval option added to set configure restore Days (similar to rgw_lc_debug_interval) There is an issue with ObjectExpirer code where in if an object is added to ObjectExpirer list and is re-written, it is not deleted from the expirer list and hence the new object may get deleted. Fixed the same and also addressed minor review comments. 3)Design doc added 4) ObjCategory should be set to CloudTiered only for cloud-transitioned objects and temporarily restored objects. Permanent copies are to be treated as regular objects. Signed-off-by: Soumya Koduri <skoduri@redhat.com>
* rgw/multipart: use cls_version to avoid racing between part upload and ↵Jane Zhu2024-08-231-2/+13
| | | | | | multipart complete Signed-off-by: Jane Zhu <jzhu116@bloomberg.net>
* Merge pull request #58046 from hualongfeng/wip_qat_zlib_data_formatCasey Bodley2024-07-261-5/+11
|\ | | | | | | | | | | Compressor: Add data format(QZ_DEFLATE_GZIP_EXT) for QAT Zlib Reviewed-by: Casey Bodley <cbodley@redhat.com> Reviewed-by: Mark Kogan <mkogan@redhat.com>
| * rgw: fixup compressor_message didn't store in some caseshualong feng2024-07-191-5/+11
| | | | | | | | | | | | | | | | | | When I upload a object to RGW by multipart, the head object xattr(user.rgw.compression) don't have compressor_message when the value should be valid and part object xattr have the value. Signed-off-by: Feng,Hualong <hualong.feng@intel.com>
* | rgw_cksum: multipart upload checksumsMatt Benjamin2024-07-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | includes commits: * fixes init-multipart header return * introduce checksum to SAL MultipartPart interface * thread optional checksum through DataProcessor * code complete multipart checksum verify * fix formatter * fix ckecksum format for multipart objects in GET/HEAD ops * always return parts_count from ReadOp::prepare() if applicable This behavior is used when returning the checksum of a multipart upload object. * tweak conditional multipart_parts_count * add checksum output to ListMultipart * fix nil-return from GetHeaderCksumResult * re-arm truncated if re-entering list-parts * complete-multipart w/list-parts * validate supplied checksum in CompleteMultipart * verify checksum type against initial checksum algorithm * rgw_op: suppress more x-amz headers * final fixes and cleanups * remove unused t0 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* | rgw: Update obj_mtime only when replication log is addedAlex Wojno2024-06-211-6/+4
|\| | | | | | | Signed-off-by: Alex Wojno <awojno@bloomberg.net>
| * RGW: Remove get_obj_state()/set_obj_state from SALDaniel Gryniewicz2024-05-281-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | RGWObjState is the state for the StoreObject class. It has historically been accessible via get_obj_state()/set_obj_state(), but the double pointer nature of this access has caused multiple bugs, and the RGWObjState itself is an implementation detail that doesn't need to be exposed. Instead, add a load_obj_state() that loads the state from the store, and use proper getters/setters for the data. Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
* | rgw: implement x-amz-replication-status for PENDING & COMPLETEDAlex Wojno2024-05-131-2/+2
|/ | | | Signed-off-by: Alex Wojno <awojno@bloomberg.net>
* rgw/sal: remove virtual class RGWOIDCProviderCasey Bodley2024-04-101-6/+24
| | | | | | | | | | | | | | class RGWOIDCProvider was doing a lot of different things, so i've split out its responsibilities: * move data members and encoding into new struct RGWOIDCProviderInfo, and add ceph-dencoder hooks for regression testing * remove RGWOIDCProvider class and add load/store/delete/list functions to the sal::Driver interface * rgw_rest_oidc_provider.cc handles most of the parameter validation, ARN parsing, and json formatting Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw/role: support Description for Create/Get/UpdateRoleCasey Bodley2024-04-101-1/+1
| | | | Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw/role: role APIs support account usersCasey Bodley2024-04-101-1/+1
| | | | Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw/iam: add pagination to ListRolesCasey Bodley2024-04-101-4/+7
| | | | | | | rename sal::Driver::get_roles() to list_roles() and add pagination support for the RGWListRoles op and 'radosgw-admin role list' Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw/sal: move list_buckets() to DriverCasey Bodley2024-04-101-6/+7
| | | | | | | | | | move User::list_buckets() to Driver and take rgw_owner to serve bucket listings for account owners also unifies the user/account stats interfaces around rgw_owner in Driver Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw: use rgw_owner in RGWBucketInfoCasey Bodley2024-04-101-8/+9
| | | | Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw/sal: pass in ACLOwner for object writesCasey Bodley2024-04-101-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | `ACLOwner` contains both the user id and display name. the bucket index needs both values for: ``` struct rgw_bucket_dir_entry_meta { ... std::string owner; std::string owner_display_name; ``` `RGWRados::Bucket::UpdateIndex::complete()` relied on the parsing of `RGW_ATTR_ACL` to get those values. but object write operations already had that information earlier in the call stack, so we might as well pass them in directly for other operations like the copy/rewrite/transition of existing objects, we decode the owner from the source object's `RGW_ATTR_ACL` the existing `owner` param was confusing, as it represented the bucket owner for quota stats updates. this get renamed to `bucket_owner` inside of `RGWRados`, and hidden from the outside. bucket stats are attributed to `RGWBucketInfo::owner`, not the `ACLOwner`, so we use that instead of `s->bucket_owner` Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw/notification: Make the Lifecycle events AWS compatiblekchheda32024-03-141-5/+11
| | | | Signed-off-by: kchheda3 <kchheda3@bloomberg.net>
* rgw/lc: use flag and named constants instead of booleans as argument in ↵Jane Zhu2024-01-101-7/+7
| | | | | | interface Signed-off-by: Juan Zhu <jzhu4@dev-10-34-20-139.pw1.bcc.bloomberg.com>
* rgw/lc: do not add datalog/bilog for some lc actionsJane Zhu2024-01-101-5/+6
| | | | Signed-off-by: Juan Zhu <jzhu4@dev-10-34-20-139.pw1.bcc.bloomberg.com>
* RGW:pubsub publish commit with etag populatedAli Masarwa2023-12-141-1/+1
| | | | Signed-off-by: Ali Masarwa <ali.saed.masarwa@gmail.com>
* rgw/sal: unify ReadStatsCB for async user/bucket statsCasey Bodley2023-11-231-2/+2
| | | | | | | | | | | | | | | `rgw::sal::Bucket::read_stats_async()` had returned stats as `map<RGWObjCategory, RGWStorageStats>`, but the only caller in rgw_quota.cc just summed up the categories into a single instance of `RGWStorageStats`. moving this summation up into rgw_rados' `RGWGetBucketStatsContext` allows us to unify these sal callbacks around `RGWStorageStats` alone the `RGWGetUserStats_CB`/`RGWGetBucketStats_CB` callbacks had inherited from `RefCountedObject` and required manual reference counting. switch to `boost::intrusive_ptr` for scope-based shared ownership Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw/sal: rename Bucket::remove_bucket() to remove()Casey Bodley2023-11-071-6/+6
| | | | Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw/sal: remove forward-to-master functions from DriverCasey Bodley2023-11-071-16/+0
| | | | Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw/sal: remove ZoneGroup::get_endpoint()Casey Bodley2023-11-071-13/+0
| | | | Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw/sal: remove load_bucket() overload with tenant/nameCasey Bodley2023-11-061-12/+0
| | | | Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw/sal: rename loading get_bucket()s to load_bucket()Casey Bodley2023-11-061-29/+14
| | | | Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw/sal: User::remove_bucket() no longer supports forward_to_masterCasey Bodley2023-11-061-6/+2
| | | | | | | callers of remove_bucket() are now responsible for calling forward_request_to_master() themselves Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw: adding request context structureYuval Lifshitz2023-10-121-1/+1
| | | | | | | | | | | | | | | | | | | this structure should be created at the frontend and trickle all the way to the RADOS layer. holding: dout prefix, optional yield and trace. in this commit, so far it was only added to the "complete()" sal interface, and to the "write_meta()" rados interface. in the future, it should be added to more sal interfaces, replacing the current way where dpp and optional yield are passed as sepearte arguments to all functions. in addition, if more information would be needed, it should be possible to add that information to the request context struct without changing many function prototypes basic test instructions: https://gist.github.com/yuvalif/1c7f1e80126bed5fa79345efb27fe1b1 Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
* rgw/lua/doc: support reloading lua packages on all RGWsYuval Lifshitz2023-10-061-2/+2
| | | | | | | | | without requiring a restart of the RGWs test instructions: https://gist.github.com/yuvalif/95b8ed9ea73ab4591c59644a050e01e2 also use capitalized "Lua" in logs/doc Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
* rgw/sal: StoreBucket no longer wraps RGWBucketEntCasey Bodley2023-09-221-2/+1
| | | | | | | | | `sal::Bucket` no longer needs to wrap `RGWBucketEnt` to support user bucket listings, so can be represented by `RGWBucketInfo` alone. the bucket stats interfaces that relied on RGWBucketEnt internally now return their result as either `RGWBucketEnt` or `RGWStorageStats` Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw: remove Bucket::update_container_stats()Casey Bodley2023-09-211-4/+0
| | | | | | callers use Bucket::read_stats() to load bucket stats Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw/sal: get_placement_target_names() returns voidCasey Bodley2023-09-181-3/+1
| | | | | | | | | | | | the function returned an integer error code, but two callers were incorrectly testing the return value as a boolean the function just returns placement ids that are in-memory, so none of the drivers have a failure case; change the return value to void Fixes: https://tracker.ceph.com/issues/62771 Signed-off-by: Casey Bodley <cbodley@redhat.com>
* RGW - Move DAOS and MOTR to proper locationsDaniel Gryniewicz2023-05-051-0/+2450
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>