Bug 2166566

Summary: Unclear error message when rgw_max_attr_size is small (Response 400)
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Itzik Brown <itbrown>
Component: RGWAssignee: Marcus Watts <mwatts>
Status: ASSIGNED --- QA Contact: Madhavi Kasturi <mkasturi>
Severity: low Docs Contact:
Priority: low    
Version: 4.0CC: ceph-eng-bugs, cephqe-warriors, fpantano, gfidente, mbenjamin, mwatts, sostapov
Target Milestone: ---   
Target Release: 6.1z2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
RGW log none

Description Itzik Brown 2023-02-02 07:52:53 UTC
Created attachment 1941728 [details]
RGW log

Description of problem:
Running Openshift on Openstack. When trying to create a new app the image-registry tries to upload an image to swift. It encounters a 400 response from RGW.
269231d162fd4eb6a4b92aa94cb8fca3$269231d162fd4eb6a4b92aa94cb8fca3 [01/Feb/2023:13:29:25.024 +0000] "PUT /swift/v1/AUTH_269231d162fd4eb6a4b92aa94cb8fca3/ostest-hdlvf-image-registry-btahhbrrceemevxwkkastuawjjxyqlfmub/files/docker/registry/v2/repositories/itzik/hello-nodejs/_uploads/a207c62d-3512-4893-94de-63fa246192a0/data HTTP/1.1" 400 15 - "distribution/v2.7.1+unknown" - latency=0.000999995s

Flow of operations can be found at https://github.com/opencontainers/distribution-spec/blob/main/spec.md#pushing-a-blob-in-chunks

From image-registry log:
swift.Writer(\"/docker/registry/v2/repositories/itzik/hello-nodejs/_uploads/436abbf7-b681-4ece-aa50-eaa0093bb450/data\", true)
error resolving upload: swift: Path not found: /docker/registry/v2/repositories/itzik/hello-nodejs/_uploads/436abbf7-b681-4ece-aa50-eaa0093bb450/data


Version-Release number of selected component (if applicable):
OSP RHOS-17.0-RHEL-9-20230119.n.1
ceph version 16.2.10-94.el8cp
OCP 4.12.1

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Itzik Brown 2023-02-02 13:29:53 UTC
The problems that I faced is caused by a small value of rgw_max_attr_size (It was set to 256)
When setting it to a bigger value (500) it works for me.

The bug can be reproduced by setting the value to 100
In the case of Openstack:
sudo cephadm shell -- ceph config set global rgw_max_attr_size 500

The upload an object with a name >100 
e.g.
$ swift upload ostest-hdlvf-image-registry-btahhbrrceemevxwkkastuawjjxyqlfmub  -S 107374182  myimg1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111

Comment 9 Giulio Fidente 2023-02-09 13:37:52 UTC
Marcus, as mentioned in https://issues.redhat.com/browse/OCPBUGS-6615 , it appears that "rgw_max_attr_size" is also limiting the object name; is that on purpose? FWIW, Swift appears to be using a different config for that.

Comment 12 Scott Ostapovicz 2023-07-17 14:58:20 UTC
Missed the window for 6.1 z1. Retargeting to 6.1 z2.