Skip to content

Instantly share code, notes, and snippets.

@cbodley
Created March 9, 2023 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbodley/4497ec07853bbf90645328811766cf41 to your computer and use it in GitHub Desktop.
Save cbodley/4497ec07853bbf90645328811766cf41 to your computer and use it in GitHub Desktop.

when GetObj returns no ETag header:

diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc
index ccb8a397aec..dbb8576ebbc 100644
--- a/src/rgw/rgw_rest_s3.cc
+++ b/src/rgw/rgw_rest_s3.cc
@@ -445,7 +445,7 @@ int RGWGetObj_ObjStore_S3::send_response_data(bufferlist& bl, off_t bl_ofs,
     } else {
       auto iter = attrs.find(RGW_ATTR_ETAG);
       if (iter != attrs.end()) {
-        dump_etag(s, iter->second.to_str());
+        //dump_etag(s, iter->second.to_str());

boto: the only s3test failures were from test cases that tried to read 'ETag' from the boto response

================================================================== short test summary info ===================================================================
FAILED s3tests_boto3/functional/test_s3.py::test_bucket_list_return_data - KeyError: 'ETag'
FAILED s3tests_boto3/functional/test_s3.py::test_bucket_list_return_data_versioning - KeyError: 'ETag'
FAILED s3tests_boto3/functional/test_s3.py::test_post_object_success_redirect_action - KeyError: 'ETag'
FAILED s3tests_boto3/functional/test_s3.py::test_put_object_ifmatch_good - KeyError: 'ETag'
FAILED s3tests_boto3/functional/test_s3.py::test_put_object_ifnonmatch_failed - KeyError: 'ETag'
FAILED s3tests_boto3/functional/test_s3.py::test_object_acl_full_control_verify_attributes - KeyError: 'ETag'
================================ 6 failed, 576 passed, 77 skipped, 112 deselected, 1 xfailed, 3 warnings in 284.51s (0:04:44) ================================
ERROR: InvocationError for command /home/cbodley/s3-tests/.tox/py/bin/pytest -m 'not fails_on_rgw and not sse_s3 and not lifecycle_expiration and not test_of_sts and not webidentity_test' (exited with code 1)

's3cmd get' expects an ETag header and fails with the same KeyError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment