86 Commits

Author SHA1 Message Date
Kefu Chai
f6c493da4d Merge pull request #64248 from zhuwei127/fix-doublefree
examples/librados: fix memory pointed to by 'rs' is freed twice.

Reviewed-by: Patrick Donnelly <pdonnell@ibm.com>
2025-11-28 21:35:46 +08:00
Gregory Farnum
e36968f5b9 Merge pull request #65743 from edwinzrodriguez/ceph-clang-format-remainder
Update misc file tab settings, based on the discussions in this PR
and https://github.com/ceph/ceph/pull/65049

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
Reviewed-by: Anthony D Atri <anthony.datri@gmail.com>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2025-10-08 16:17:59 -07:00
Edwin Rodriguez
1480cacaae Added blank line after header block
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
2025-10-02 17:35:10 -04:00
Edwin Rodriguez
e376f67e2f Update indent settings remainder
Fixes: https://tracker.ceph.com/issues/72587
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
2025-10-02 17:35:10 -04:00
Edwin Rodriguez
c8c1019d19 Add missing blank line after comment block
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
2025-10-02 17:32:57 -04:00
Edwin Rodriguez
f1bac41828 Update indent settings cc
Fixes: https://tracker.ceph.com/issues/72587
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
2025-10-02 17:32:57 -04:00
Yuval Lifshitz
60a7f72bb1 rgw/logging: rollover objects when conf changes
and return the name of the flushed object to the client

Fixes: https://tracker.ceph.com/issues/72940

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
2025-09-10 15:12:24 +00:00
zhuwei
e8dd59354c examples/librados: fix memory pointed to by 'rs' is freed twice.
If striper_create() fails and delete rs; is called, and then read_file() also fails and calls delete rs; again, it will result in a double free, which may cause the program to crash or exhibit undefined behavior.

Signed-off-by: Zhu Wei <zhuwei_yewu@cmss.chinamobile.com>
2025-06-30 10:59:23 +08:00
Yuval Lifshitz
fb2b037355 rgw/logging: send flushed object name in API reply
Fixes: https://tracker.ceph.com/issues/71219

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
2025-06-09 17:37:59 +00:00
Casey Bodley
b05a9580f8 examples/rgw: register boto extension for BucketIndex on CreateBucket
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2025-02-25 11:15:57 -05:00
Yuval Lifshitz
2c6d3ec3d8 rgw/notification/logging: add bucket as context param
when URI has the form: "/{Bucket}?<action>"
the "Bucket" parameter has to be added as context parameter for
botocore based clients to send the operation as a bucket
operation

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
2025-02-10 17:07:21 +00:00
Casey Bodley
d81d15839a examples/rgw: add type to HeadBucketOutput for old boto
0f55c1759d added an override for
the "HeadBucketOutput" shape, but that didn't exist until botocore
1.33.2. s3-tests is pinned to botocore <1.28.0

Fixes: https://tracker.ceph.com/issues/69582

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2025-01-24 11:20:36 -05:00
Casey Bodley
0f55c1759d examples/rgw: register boto extension for HeadBucket stats
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2024-12-17 15:28:52 -05:00
Ali Masarwa
a508216657 Merge pull request #60942 from AliMasarweh/wip-alimasa-bucket-logging-filter
RGW/logging: add filtering for bucket logging 

Reviewed-by: yuvalif<ylifshit@redhat.com>
2024-12-17 20:06:51 +02:00
Ali Masarwa
e03f5ca25f RGW\logging: convert s3_filter to key_filter
Signed-off-by: Ali Masarwa <amasarwa@redhat.com>
2024-12-17 13:06:11 +02:00
Ali Masarwa
ca9e0f4061 RGW/logging: add filtering for bucket logging
Signed-off-by: Ali Masarwa <amasarwa@redhat.com>
2024-12-17 13:06:04 +02:00
Ali Masarwa
9a9e14db35 RGW/logging: add rest API to flush logging bucket
Signed-off-by: Ali Masarwa <amasarwa@redhat.com>
2024-12-17 12:55:39 +02:00
Yuval Lifshitz
790c38eacc rgw/logging: add support for GetBucketLogging and PutBucketLogging
this is based on AWS server access logs:
- https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html
- https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerLogs.html
- https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html
- https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html

however, a new mode was added called "journal" where:
- logs of PUT, COPY and MPU are guaranteed
- we have logs of DELETE and multi-DELETE operations (not guaranteed)
- log records hold only minimal amount of information

Fixes: https://tracker.ceph.com/issues/984

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2024-12-08 16:20:50 +00:00
rkhudov
508bba9b0d examples/rgw/boto3/README.md: update documentation for boto3 extension installation. Fixes: https://tracker.ceph.com/issues/67768
Signed-off-by: rkhudov <rhudov@gmail.com>
2024-08-29 14:17:13 +01:00
Soumya Koduri
bbf0393168 Add new sync-policy related params to boto3 extension
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
2024-05-13 22:15:53 +05:30
Josh Soref
ed70d843df rgw: fix spelling errors
* access
* acquire
* across
* algorithm
* alternatively
* ambiguous
* attributes
* authenticated
* automatically
* based
* between
* beware
* bootstrap
* bucket
* cache
* character
* check
* cleanup
* combinations
* committed
* comparison
* compatibility
* concurrent
* conditions
* conjunction
* connections
* considered
* contains
* correct
* creates
* crypto
* dependencies
* dequeued
* dequeuing
* derivative
* described
* determine
* deterministic
* detritus
* discrepancy
* display
* either way
* elements
* entirely
* entries
* error
* everything
* expected
* explicitly
* extend
* false
* fclose
* feature
* following
* foreign
* format
* forward
* functionality
* functions
* generated
* getting
* gracefully
* happened
* hashicorp
* healthcheck
* hierarchy
* however
* http
* identify
* idleness
* ignored
* incremental
* information
* initialization
* length
* locally
* macros
* malformed
* means
* mechanism
* multipart
* multiple
* must
* namespace
* necessary
* nonexistent
* notifications
* occurred
* official
* outputs
* outputted
* overridden
* ownership
* parallelism
* partition
* passthrough
* pause
* penguin
* perform
* permission
* populated
* position
* preferably
* prefixes
* presumably
* previous
* print
* quadruple
* reference
* regardless
* registry
* renewed
* request
* requires
* reshard
* resource
* result to
* satisfy
* secret
* separate
* separator
* setting
* shouldn't
* skipping
* some
* somehow
* something
* specific
* struct
* succeeded
* success
* successful
* successfully
* syntax
* testing
* truncated
* unambiguously
* unittest
* unmodified
* unnecessary
* valid_action
* verifying
* versioning
* visible
* whatever
* whenever

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-11-27 10:27:32 -05:00
Konstantin Monakhov
608c7111aa examples: fixed errors with the if-match header in the examples of rgw-cache nginx configs
Signed-off-by: Konstantin Monakhov <stangerkm@gmail.com>
2023-09-10 22:08:50 +06:00
Justin Caratzas
47b954f1a8 examples: replace example go modules with instructions to run
Signed-off-by: Justin Caratzas <jcaratza@ibm.com>
2023-05-10 08:44:46 -04:00
Ilya Dryomov
673373f829 Merge pull request #50202 from rzarzynski/wip-librbd-drop-cxx11-from-example
examples/librbd: drop -std=c++11 from CXXFLAGS

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2023-02-23 18:25:14 +01:00
Radoslaw Zarzynski
e9495737f9 examples/librbd: drop -std=c++11 from CXXFLAGS
In terms of `CXXFLAGS` this commit does for `examples/librbd`
exactly what be838652fa already
did to `examples/librados`. Together they cover the purpose
of the long-waiting PR #44738.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2023-02-21 20:43:18 +00:00
Casey Bodley
36747b08ff examples: move rgw examples under subdirectory
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2023-02-13 17:20:26 -05:00
Laura Flores
80893b4e51 Merge pull request #47900 from Matan-B/wip-matanb-librados-20
examples/librados: Compile with c++20 on Ubuntu
2022-09-21 10:06:12 -05:00
Matan Breizman
be838652fa examples: Compile with c++20
This change will apply to ubuntu only.
Fixes: https://tracker.ceph.com/issues/57163

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2022-09-19 13:18:20 +00:00
Yuval Lifshitz
72f8cfadb3 Merge pull request #47274 from faithuniterh/Golang-Notification-creation
examples/golang : Add put notification creation golang example code

reviewed-by: yuvalif
2022-09-08 12:31:24 +03:00
Yuval Lifshitz
e85e121747 Merge pull request #47091 from faithuniterh/Golang-Topic-creation
Topic creation example and sorting Golang examples into different folders

reviewed-by: anthonyeleven, yuvalif
2022-09-07 21:15:52 +03:00
Faith
d6c20f9714 examples/golang/put-bucket-notification-creation : Add put bucket notification creation example code
Signed-off-by: Faith <faithuniterh@tutanota.com>
2022-09-02 08:56:20 +00:00
Salar Nosrati-Ershad
07030ac4fa examples/boto3: add ListObjectsV2Request shape to boto3 sdk extras with AllowUnordered as member
feat: add ListObjectsV2Request shape to boto3 sdk extras with AllowUnordered as member

feat: add list-objects-v2 unordered supports to doc

Signed-off-by: Salar Nosrati-Ershad <snosratiershad@gmail.com>
2022-08-06 08:53:18 +04:30
dux
e4ef6da47c examples/golang : Add Golang examples
Signed-off-by: dux <faithuniterh@tutanota.com>
2022-07-29 14:24:44 +00:00
dux
ed2c0247f9 examples/boto3: Updating Python examples to work with Python 3
Signed-off-by: dux <faithuniterh@tutanota.com>
2022-07-12 14:53:35 +00:00
Yuval Lifshitz
98bfe85f1f Merge pull request #45937 from faithuniterh/adding_go_examples
examples: Add Golang code showing object upload to Ceph RGW bucket 

Reviwed-by: anthonyeleven
Reviwed-by: yuvalif
2022-06-09 10:36:17 +03:00
Yuval Lifshitz
80ffccaa17 Merge pull request #45970 from faithuniterh/adding_java_examples
examples: Add Java code showing object upload to Ceph RGW bucket

Reviewed-by: anthonyeleven
Reviewed-by: yuvalif
2022-06-09 10:33:18 +03:00
faithuniterh
7d1ec30e51 examples: Add Java code showing object upload to Ceph RGW bucket
Signed-off-by: faithuniterh <faithuniterh@tutanota.com>
2022-06-08 23:21:03 +03:00
faithuniterh
1acd53e373 examples: Add Golang code showing object upload to Ceph RGW bucket
Signed-off-by: faithuniterh <faithuniterh@tutanota.com>
2022-06-08 23:02:15 +03:00
Prashant D
9b40fdad5a examples: Add rgw script to access admin APIs using curl
The rgw_admin_curl.sh script will allow end-user/developers to
access RGW admin APIs through curl command.

Signed-off-by: Prashant D <pdhange@redhat.com>
2022-05-06 11:14:12 -04:00
Dimitri Papadopoulos
8bb36215e0 examples: typos found by codespell
Signed-off-by: Dimitri Papadopoulos <dpo.ceph@mail.com>
2021-12-22 00:08:42 +01:00
Curt Bruns
bbd7f0dbaf rgw/lua: Example read/write of StorageClass field
Admins may setup different pools for RGW objects and
having the StorageClass field mutable allows the steering
of RGW objects to the proper pools.  This Lua example shows
how a user can modify the StorageClass header when
it is empty on a PUT request and steer objects to different
pools based on size (Request.ContentLength).

Signed-off-by: Curt Bruns <curt.e.bruns@gmail.com>
2021-11-01 19:45:38 -04:00
Injae Kang
acc929a0b9 examples/librados: avoid a memory leak
Avoid a memory leak by deallocating the pre-allocated aio completion.

Signed-off-by: Injae Kang <abcinje@gmail.com>
2021-09-18 15:16:55 +09:00
Zulai Wang
9b8a75a19b examples: add elasticsearch and prometheus examples
Add examples on how to use lua scripting to push request fields from the RGW to Elasticsearch and Prometheus.

Signed-off-by: Zulai Wang <zl31wang@gmail.com>
2021-09-01 13:39:19 +08:00
Matan Breizman
a7d80da604 rgw: Add an example for lua scripting
example on how to use 'lua scripting' feature to add NATS
to the list of bucket notification endpoints

depends on PR: #41927 and #42102

Signed-off-by: Matan Breizman <Matan.Brz@gmail.com>
2021-07-05 14:48:29 +00:00
Yuval Lifshitz
d1b5084cd7 rgw/notifications: support v4 auth for topics and notifications
Fixes: https://tracker.ceph.com/issues/50039

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2021-06-24 18:06:30 +03:00
Casey Bodley
1e31479f64 Merge pull request #37956 from dorindabassey/example-notific
examples/boto3/README: examples notification

Reviewed-by: Yuval Lifshitz <ylifshit@redhat.com>
2020-12-08 08:51:04 -05:00
dorindabassey
cd6ce38a0f examples/boto3/README: examples notification
added examples on how to fetch attributes of a specific topic
add explanation on SNS signature version

Fixes: https://tracker.ceph.com/issues/46243

Signed-off-by: dorindabassey <dorindabassey@gmail.com>

Co-authored-by: Yuval Lifshitz <ylifshit@redhat.com>
2020-12-03 13:24:13 +02:00
Or Friedmann
706e077a79 rgw: send headers of quota settings
Make the quota settings visible to s3 and swift users
rgw send headers of quota settings

Fixes: https://tracker.ceph.com/issues/47752

Signed-off-by: Or Friedmann <ofriedma@redhat.com>
2020-10-15 18:54:47 +03:00
Mark Kogan
6251d2b6c1 rgw: add PUT and POST req support to data cache
facilitates the full usage of the Nginx cache endpoint
with s3 tools that support AWSv4
like s3cmd,aws-cli, benchmarking tools like hsbench
and also hadoop/s3a.

Co-authored-by: Or Friedmann <ofriedma@redhat.com>
Signed-off-by: Mark Kogan <mkogan@redhat.com>
2020-07-21 15:23:57 +03:00
ofriedma
d73b879ac1 rgw: fix nginx-rgw docs
Signed-off-by: Or Friedmann <ofriedma@redhat.com>

Signed-off-by: Mark Kogan <mkogan@redhat.com>
2020-06-01 12:24:19 +03:00