From: Tom Schoonjans Date: Tue, 6 Apr 2021 05:34:22 +0000 (+0000) Subject: rgw: fix spelling of eTag in S3 message structure X-Git-Tag: v16.2.7~115^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9638ae7e1ef757eca989332e9b5b8b5b4b9bb87f;p=ceph.git rgw: fix spelling of eTag in S3 message structure An S3 object event contains its eTag, currently spelled as 'etag' in the message structure, which does not correspond to the documentation example (https://docs.ceph.com/en/latest/radosgw/notifications/#events), or what is used by AWS (https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-content-structure.html). Fixes bug https://tracker.ceph.com/issues/50115 Signed-off-by: Tom Schoonjans (cherry picked from commit 4c824d78a6ef1c706574f487b02016baffdc2684) Conflicts: src/test/rgw/bucket_notification/test_bn.py PendingReleaseNotes --- diff --git a/PendingReleaseNotes b/PendingReleaseNotes index e801a586e73..2d81f949a2b 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -32,6 +32,8 @@ >=16.0.0 -------- +* RGW: S3 bucket notification events now contain `eTag` instead of `etag`, fixing + a deviation from the message format observed on AWS. * `ceph-mgr-modules-core` debian package does not recommend `ceph-mgr-rook` anymore. As the latter depends on `python3-numpy` which cannot be imported in different Python sub-interpreters multi-times if the version of diff --git a/src/rgw/rgw_pubsub.cc b/src/rgw/rgw_pubsub.cc index c981fc03f55..17d9ae221f6 100644 --- a/src/rgw/rgw_pubsub.cc +++ b/src/rgw/rgw_pubsub.cc @@ -274,7 +274,7 @@ void rgw_pubsub_s3_event::dump(Formatter *f) const { Formatter::ObjectSection sub_s(*f, "object"); encode_json("key", object_key, f); encode_json("size", object_size, f); - encode_json("etag", object_etag, f); + encode_json("eTag", object_etag, f); encode_json("versionId", object_versionId, f); encode_json("sequencer", object_sequencer, f); encode_json("metadata", x_meta_map, f);