<rgw> Ensure the ETag format is consistent with AWS S3 API#60477
<rgw> Ensure the ETag format is consistent with AWS S3 API#60477
Conversation
|
jenkins test make check |
|
jenkins test api |
|
@cbodley gentle ping :) |
thanks @VVoidV. it's hard for me to evaluate changes like this, where there's some risk of breaking clients that rely on the current format what kind of testing would we need to validate this? cc @adamemerson @ivancich |
@cbodley One of our apps is complaining about data inconsistency under certain loads. It uses ETag to detect whether the data has changed remotely. The ETag can come from HEAD, LIST, PUT, CompleteMultipartUpload, etc. We use the AWS Go SDK, and the ETag is always referred to in the response entity. Now, we need to handle both quoted and unquoted versions. If others have already dealt with this, they might encounter issues after we add the quotes. |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
2c553e1 to
1a31f7d
Compare
|
Can one of the admins verify this patch? |
1a31f7d to
44b95c1
Compare
cbodley
left a comment
There was a problem hiding this comment.
rebased and added a release note
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
AWS S3 API quotes ETAG everywhere. We still missed a few places.
checked with following cmd.
```
$ rg -i "dump.*\"ETag\"" ceph
./src/rgw/rgw_rest_s3.cc
1863: s->formatter->dump_format("ETag", "\"%s\"", iter->meta.etag.c_str());
1955: s->formatter->dump_format("ETag", "\"%s\"", iter->meta.etag.c_str());
2030: s->formatter->dump_format("ETag", "\"%s\"", iter->meta.etag.c_str());
2099: s->formatter->dump_format("ETag", "\"%s\"", iter->meta.etag.c_str());
2785: s->formatter->dump_format("ETag", "\"%s\"", etag.c_str());
3422: s->formatter->dump_string("ETag", etag);
3725: s->formatter->dump_format("ETag", "\"%s\"",etag.c_str());
4228: s->formatter->dump_string("ETag", etag);
4298: s->formatter->dump_format("ETag", "\"%s\"", part->get_etag().c_str());
./src/rgw/rgw_rest.cc
421: return dump_header(s, "etag", etag);
423: return dump_header_quoted(s, "ETag", etag);
./src/rgw/driver/rados/rgw_sync_module_es_rest.cc
347: s->formatter->dump_format("ETag", "\"%s\"", e.meta.etag.c_str());
./src/rgw/rgw_admin.cc
8612: handled = dump_string("etag", bl, formatter.get());
```
Signed-off-by: liubingrun <[email protected]>
Signed-off-by: Casey Bodley <[email protected]>
44b95c1 to
b1c7958
Compare
|
i pushed a rebase to resolve a minor conflict with #61878 |
|
thanks @VVoidV, sorry for the delay |
https://tracker.ceph.com/issues/68712
AWS S3 API quotes ETag everywhere.
Most ETags returned by RGW are quoted, but some are still not. This can cause false positives during consistency checks when comparing ETags returned by different interfaces.
checked with following cmd.
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 windowsjenkins test rook e2e