Actions
Bug #17935
closedrgw: wrong error code is returned when putting container metadata with too long name
% Done:
0%
Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
Recently Tempest got couple of negative tests for verifying interactions with misbehaving clients. RadosGW wrongly responds on requests containing custom attributes with names exceeding the length limit:
T 127.0.0.1:33508 -> 127.0.0.1:8000 [AP] PUT /v1/KEY_3db7db321b1749249e9b2ebfd89b01b8/TestContainer-2122552524 HTTP/1.1. Host: 127.0.0.1:8000. Accept-Encoding: identity. connection: close. X-Container-Meta-testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestte: penguin. X-Auth-Token: 7469a6fb27b94ab08b6fa0698e794ed8. . ## T 127.0.0.1:8000 -> 127.0.0.1:33508 [AP] HTTP/1.1 500 Internal Server Error. Content-Length: 12. X-Trans-Id: tx000000000000000000004-00582db1b9-1011-default. Accept-Ranges: bytes. Content-Type: text/plain; charset=utf-8. Date: Thu, 17 Nov 2016 13:33:45 GMT. Connection: close. . ## T 127.0.0.1:8000 -> 127.0.0.1:33508 [AP] UnknownError
According to Tempest we should return 400 Bad Request with Metadata name too long instead.
The issue causes failure of following testcase:
tempest.api.object_storage.test_container_services_negative.ContainerNegativeTest.test_create_container_metadata_name_exceeds_max_length
Actions