Project

General

Profile

Bug #17935

rgw: wrong error code is returned when putting container metadata with too long name

Added by Radoslaw Zarzynski about 1 year ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
11/17/2016
Due date:
% Done:

0%

Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
Needs Doc:
No

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


Related issues

Copied to rgw - Backport #21459: luminous: rgw: wrong error code is returned when putting container metadata with too long name Resolved

History

#1 Updated by Radoslaw Zarzynski about 1 year ago

  • Status changed from New to In Progress

#2 Updated by Radoslaw Zarzynski about 1 year ago

  • Status changed from In Progress to Need Review

#3 Updated by Matt Benjamin 3 months ago

  • Status changed from Need Review to Pending Backport
  • Backport set to Luminous

#5 Updated by Nathan Cutler 3 months ago

  • Backport changed from Luminous to luminous

#6 Updated by Nathan Cutler 3 months ago

  • Copied to Backport #21459: luminous: rgw: wrong error code is returned when putting container metadata with too long name added

#7 Updated by Nathan Cutler 2 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF