Bug #58365
test_user_policy fails when running locally
% Done:
0%
Source:
Development
Tags:
s3test
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
====================================================================== ERROR: s3tests_boto3.functional.test_s3.test_user_policy ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/yuvalif/s3-tests/virtualenv/lib/python3.6/site-packages/nose/case.py", line 198, in runTest self.test(*self.arg) File "/home/yuvalif/s3-tests/s3tests_boto3/functional/test_s3.py", line 14056, in test_user_policy UserName=get_tenant_user_id(), File "/home/yuvalif/s3-tests/virtualenv/lib/python3.6/site-packages/botocore/client.py", line 508, in _api_call return self._make_api_call(operation_name, kwargs) File "/home/yuvalif/s3-tests/virtualenv/lib/python3.6/site-packages/botocore/client.py", line 911, in _make_api_call raise error_class(parsed_response, operation_name) botocore.exceptions.ClientError: An error occurred (Unknown) when calling the PutUserPolicy operation: Unknown
rgw log:
10796-2022-12-27T16:04:49.587+0000 7f7045c3c700 1 ====== starting new request req=0x7f7030c12490 ===== [35/3504] 10797-2022-12-27T16:04:49.587+0000 7f7045c3c700 2 req 13301451907991742920 0.000000000s initializing for trans_id = tx00000b898400944ca29c8-0063ab17a1-103b-default 10798-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s rgw api priority: s3=8 s3website=7 10799-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s host=localhost 10800-2022-12-27T16:04:49.587+0000 7f7045c3c700 20 req 13301451907991742920 0.000000000s subdomain= domain= in_hosted_domain=0 in_hosted_domain_s3website=0 10801-2022-12-27T16:04:49.587+0000 7f7045c3c700 20 req 13301451907991742920 0.000000000s final domain/bucket subdomain= domain= in_hosted_domain=0 in_hosted_domain_s3website=0 s->info.domain= s->info.request_uri=/ 10802-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s meta>> HTTP_X_AMZ_CONTENT_SHA256 10803-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s meta>> HTTP_X_AMZ_DATE 10804-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s x>> x-amz-content-sha256:121f2e29123b923d681937805d5b896c9c2d659bdcaf84db612efc8d5e119e11 10805-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s x>> x-amz-date:20221227T160449Z 10806-2022-12-27T16:04:49.587+0000 7f7045c3c700 20 req 13301451907991742920 0.000000000s get_handler handler=26RGWHandler_REST_Service_S3 10807-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s handler=26RGWHandler_REST_Service_S3 10808-2022-12-27T16:04:49.587+0000 7f7045c3c700 2 req 13301451907991742920 0.000000000s getting op 4 10809-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s Content of POST: Action=PutUserPolicy&Version=2010-05-08&PolicyDocument=%7B%22Version%22%3A+%222012-10-17%22%2C+%22Statement%22%3A+%7B%22Effect%22%3A +%22Allow%22%2C+%22Action%22%3A+%22%2A%22%2C+%22Resource%22%3A+%22%2A%22%7D%7D&PolicyName=AllAccessPolicy&UserName=some-non-existing-user-id 10810-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s Content of POST: Action=PutUserPolicy&Version=2010-05-08&PolicyDocument=%7B%22Version%22%3A+%222012-10-17%22%2C+%22Statement%22%3A+%7B%22Effect%22%3A +%22Allow%22%2C+%22Action%22%3A+%22%2A%22%2C+%22Resource%22%3A+%22%2A%22%7D%7D&PolicyName=AllAccessPolicy&UserName=some-non-existing-user-id 10811-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s cache get: name=default.rgw.log++script.prerequest. : hit (negative entry) 10812-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s iam:put_user-policy scheduling with throttler client=0 cost=1 10813-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s iam:put_user-policy op=16RGWPutUserPolicy 10814-2022-12-27T16:04:49.587+0000 7f7045c3c700 2 req 13301451907991742920 0.000000000s iam:put_user-policy verifying requester 10815-2022-12-27T16:04:49.587+0000 7f7045c3c700 20 req 13301451907991742920 0.000000000s iam:put_user-policy rgw::auth::StrategyRegistry::s3_main_strategy_t: trying rgw::auth::s3::AWSAuthStrategy 10816-2022-12-27T16:04:49.587+0000 7f7045c3c700 20 req 13301451907991742920 0.000000000s iam:put_user-policy rgw::auth::s3::AWSAuthStrategy: trying rgw::auth::s3::S3AnonymousEngine 10817-2022-12-27T16:04:49.587+0000 7f7045c3c700 20 req 13301451907991742920 0.000000000s iam:put_user-policy rgw::auth::s3::S3AnonymousEngine denied with reason=-1 10818-2022-12-27T16:04:49.587+0000 7f7045c3c700 20 req 13301451907991742920 0.000000000s iam:put_user-policy rgw::auth::s3::AWSAuthStrategy: trying rgw::auth::s3::LocalEngine 10819-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s v4 signature format = 80e67dafb310fa36a1ee6bcb2486f18a1b877fea8b505257c1961fc066baa958 10820-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s v4 credential format = ABCDEFGHIJKLMNOPQRST/20221227//iam/aws4_request 10821-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s access key id = ABCDEFGHIJKLMNOPQRST 10822-2022-12-27T16:04:49.587+0000 7f7045c3c700 10 req 13301451907991742920 0.000000000s credential scope = 20221227//iam/aws4_request 10823-2022-12-27T16:04:49.588+0000 7f7045c3c700 10 req 13301451907991742920 0.001000000s canonical headers format = content-type:application/x-www-form-urlencoded; charset=utf-8 10824-host:localhost:8000 10825-x-amz-content-sha256:121f2e29123b923d681937805d5b896c9c2d659bdcaf84db612efc8d5e119e11 10826-x-amz-date:20221227T160449Z 10827- 10828-2022-12-27T16:04:49.588+0000 7f7045c3c700 10 req 13301451907991742920 0.001000000s payload request hash = 121f2e29123b923d681937805d5b896c9c2d659bdcaf84db612efc8d5e119e11 10829-2022-12-27T16:04:49.588+0000 7f7045c3c700 10 req 13301451907991742920 0.001000000s canonical request = POST 10830-/ 10831- 10832-content-type:application/x-www-form-urlencoded; charset=utf-8 10833-host:localhost:8000 10834-x-amz-content-sha256:121f2e29123b923d681937805d5b896c9c2d659bdcaf84db612efc8d5e119e11 10835-x-amz-date:20221227T160449Z 10836- 10837-content-type;host;x-amz-content-sha256;x-amz-date 10838-121f2e29123b923d681937805d5b896c9c2d659bdcaf84db612efc8d5e119e11 10839-2022-12-27T16:04:49.588+0000 7f7045c3c700 10 req 13301451907991742920 0.001000000s canonical request hash = 3bce72bba2edfce6874f395ed93c3c1594a3683487387d6f7a270f0917398912 10840-2022-12-27T16:04:49.588+0000 7f7045c3c700 10 req 13301451907991742920 0.001000000s string to sign = AWS4-HMAC-SHA256 10841-20221227T160449Z 10842-20221227//iam/aws4_request 10843-3bce72bba2edfce6874f395ed93c3c1594a3683487387d6f7a270f0917398912 10844-2022-12-27T16:04:49.588+0000 7f7045c3c700 10 req 13301451907991742920 0.001000000s date_k = d6f42813245ac55e44f45f1f4231fe70737a1450a021d72f708a0bb18ddba88c 10845-2022-12-27T16:04:49.588+0000 7f7045c3c700 10 req 13301451907991742920 0.001000000s region_k = 672f9b2b65379148f1caffa530e4bde5209e941c275542c514557c7fb44097b2 10846-2022-12-27T16:04:49.588+0000 7f7045c3c700 10 req 13301451907991742920 0.001000000s service_k = 9a34cc8c9fc3e63f84f1d4b627c0a4de7f867a68fd3be6c2a7f778af04e20306 10847-2022-12-27T16:04:49.588+0000 7f7045c3c700 10 req 13301451907991742920 0.001000000s signing_k = 208cd3c01c365ff8c3f6c37f8347e4f6293f27455164828a86176ebed276cf5b 10848-2022-12-27T16:04:49.588+0000 7f7045c3c700 10 req 13301451907991742920 0.001000000s generated signature = 80e67dafb310fa36a1ee6bcb2486f18a1b877fea8b505257c1961fc066baa958 10849-2022-12-27T16:04:49.588+0000 7f7045c3c700 15 req 13301451907991742920 0.001000000s iam:put_user-policy string_to_sign=AWS4-HMAC-SHA256 10850-20221227T160449Z 10851-20221227//iam/aws4_request 10852-3bce72bba2edfce6874f395ed93c3c1594a3683487387d6f7a270f0917398912 10853-2022-12-27T16:04:49.588+0000 7f7045c3c700 15 req 13301451907991742920 0.001000000s iam:put_user-policy server signature=80e67dafb310fa36a1ee6bcb2486f18a1b877fea8b505257c1961fc066baa958 10854-2022-12-27T16:04:49.588+0000 7f7045c3c700 15 req 13301451907991742920 0.001000000s iam:put_user-policy client signature=80e67dafb310fa36a1ee6bcb2486f18a1b877fea8b505257c1961fc066baa958 10855-2022-12-27T16:04:49.588+0000 7f7045c3c700 15 req 13301451907991742920 0.001000000s iam:put_user-policy compare=0 10856-2022-12-27T16:04:49.588+0000 7f7045c3c700 20 req 13301451907991742920 0.001000000s iam:put_user-policy rgw::auth::s3::LocalEngine granted access 10857-2022-12-27T16:04:49.588+0000 7f7045c3c700 20 req 13301451907991742920 0.001000000s iam:put_user-policy rgw::auth::s3::AWSAuthStrategy granted access 10858-2022-12-27T16:04:49.588+0000 7f7045c3c700 2 req 13301451907991742920 0.001000000s iam:put_user-policy normalizing buckets and tenants 10859-2022-12-27T16:04:49.588+0000 7f7045c3c700 10 req 13301451907991742920 0.001000000s s->object=<NULL> s->bucket= 10860-2022-12-27T16:04:49.588+0000 7f7045c3c700 2 req 13301451907991742920 0.001000000s iam:put_user-policy init permissions 10861-2022-12-27T16:04:49.588+0000 7f7045c3c700 10 req 13301451907991742920 0.001000000s iam:put_user-policy cache get: name=default.rgw.meta+users.uid+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef : hit (requested=0x13 , cached=0x13) 10862-2022-12-27T16:04:49.588+0000 7f7045c3c700 2 req 13301451907991742920 0.001000000s iam:put_user-policy recalculating target 10863-2022-12-27T16:04:49.588+0000 7f7045c3c700 2 req 13301451907991742920 0.001000000s iam:put_user-policy reading permissions 10864-2022-12-27T16:04:49.588+0000 7f7045c3c700 2 req 13301451907991742920 0.001000000s iam:put_user-policy init op 10865-2022-12-27T16:04:49.588+0000 7f7045c3c700 2 req 13301451907991742920 0.001000000s iam:put_user-policy verifying op mask 10866-2022-12-27T16:04:49.588+0000 7f7045c3c700 20 req 13301451907991742920 0.001000000s iam:put_user-policy required_mask= 0 user.op_mask=7 10867-2022-12-27T16:04:49.588+0000 7f7045c3c700 2 req 13301451907991742920 0.001000000s iam:put_user-policy verifying op permissions 10868-2022-12-27T16:04:49.588+0000 7f7045c3c700 2 req 13301451907991742920 0.001000000s iam:put_user-policy verifying op params 10869-2022-12-27T16:04:49.588+0000 7f7045c3c700 2 req 13301451907991742920 0.001000000s iam:put_user-policy pre-executing 10870-2022-12-27T16:04:49.588+0000 7f7045c3c700 2 req 13301451907991742920 0.001000000s iam:put_user-policy check rate limiting 10871-2022-12-27T16:04:49.588+0000 7f7045c3c700 2 req 13301451907991742920 0.001000000s iam:put_user-policy executing 10872-2022-12-27T16:04:49.588+0000 7f7045c3c700 10 req 13301451907991742920 0.001000000s cache get: name=default.rgw.meta+users.uid+some-non-existing-user-id : miss 10873-2022-12-27T16:04:49.588+0000 7f7045c3c700 20 req 13301451907991742920 0.001000000s rados->read ofs=0 len=0 10874-2022-12-27T16:04:49.588+0000 7f7045c3c700 1 -- 172.21.5.157:0/3768712245 --> [v2:172.21.5.157:6802/1631622,v1:172.21.5.157:6803/1631622] -- osd_op(unknown.0.0:853 4.0 4:1fd224dc:users.uid::some-non-existing-user-id:head [call versi on.read in=11b,read 0~0,getxattrs] snapc 0=[] ondisk+read+known_if_redirected+supports_pool_eio e19) v8 -- 0x564251415000 con 0x5642497ae400 10875-2022-12-27T16:04:49.589+0000 7f715a307700 1 -- 172.21.5.157:0/3768712245 <== osd.0 v2:172.21.5.157:6802/1631622 963 ==== osd_op_reply(853 some-non-existing-user-id [call,read 0~0,getxattrs] v0'0 uv0 ondisk = -2 ((2) No such file or directory)) v8 ==== 253+0+0 (crc 0 0 0) 0x5642511d7d40 con 0x5642497ae400 10876-2022-12-27T16:04:49.589+0000 7f703d42b700 20 req 13301451907991742920 0.001999999s rados_obj.operate() r=-2 bl.length=0 10877-2022-12-27T16:04:49.589+0000 7f703d42b700 10 req 13301451907991742920 0.001999999s cache put: name=default.rgw.meta+users.uid+some-non-existing-user-id info.flags=0x0 10878-2022-12-27T16:04:49.589+0000 7f703d42b700 10 req 13301451907991742920 0.001999999s adding default.rgw.meta+users.uid+some-non-existing-user-id to cache LRU end 10879-2022-12-27T16:04:49.589+0000 7f703d42b700 2 req 13301451907991742920 0.001999999s iam:put_user-policy completing 10880-2022-12-27T16:04:49.589+0000 7f703b427700 10 req 13301451907991742920 0.001999999s cache get: name=default.rgw.log++script.postrequest. : hit (negative entry) 10881-2022-12-27T16:04:49.589+0000 7f703b427700 2 req 13301451907991742920 0.001999999s iam:put_user-policy op status=-2301 10882:2022-12-27T16:04:49.589+0000 7f703b427700 2 req 13301451907991742920 0.001999999s iam:put_user-policy http status=404
History
#1 Updated by Casey Bodley 2 months ago
- Assignee set to Pritha Srivastava
#2 Updated by Casey Bodley about 2 months ago
- Status changed from New to Fix Under Review
- Pull request ID set to 49825
in teuthology, the qa/tasks/s3tests.py task adds '--caps user-policy=*' to all users it creates
vstart.sh only added caps to the [iam] user, but test_user_policy() runs as the [s3 tenant] user
#3 Updated by Casey Bodley about 2 months ago
even when caps are added, the request still fails with ERR_NO_SUCH_ENTITY, because it specifies a 'UserName=9876543210abcdef0123456789abcdef0123456789abcdef0123456789abcdef' without the tenant name
there are a lot of other put_user_policy test coverage in test_iam.py. maybe we should just remove this test_user_policy() in test_s3.py?
#4 Updated by Pritha Srivastava about 2 months ago
Yes, I think its ok to remove this test.
#5 Updated by Casey Bodley about 2 months ago
- Pull request ID deleted (
49825)
removed from s3tests in https://github.com/ceph/s3-tests/pull/486
#6 Updated by Casey Bodley about 1 month ago
- Status changed from Fix Under Review to Resolved