max_meta_value_length is not correctly used

Bug #1825387 reported by Bellego
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
New
Undecided
Unassigned

Bug Description

Hello,

I'm using Swift Rocky and i changed the value of max_meta_value_length in swift.conf :
# /etc/swift/swift.conf
[swift-constraints]
max_meta_value_length = 2048

This request is OK :
# Valid request with metadata (256 bytes)
curl -i http://controller:8080/v1/AUTH_21f2a561d80345318e5092a87a0675f8/container1/helloworld.txt -X PUT -d "Hello" -H "Content-Type: text/html; charset=UTF-8" -H "X-Auth-Token: gAAAAABcuJCWipnlVuX_FftkPS0SGeqOLIdnKEiuSa1yNVV2yUe5q3ASb7lv4EqmUeq0x_Eu0BhNtWHh7e5p_Nx8qqp6fPW8BlT-_7gNsTb9K4iDQj7I7Hhf89GoD46QUPHGPVCAJgywykaCtA2dsiR7eSj6Ac2CHpGWDE9TACdQ462iL7jNEz0" -H "X-Object-Meta-Label: zerzerzerzrzerzrzrzrzrzerzrfgrgtrmlbkrtmbonrmotbnrmotbnrtrontgzerzerzerzrzerzrzaaaaaaaaaaaaaaaaaaaaazerzerzerzrzerzrzrzrzrzerzrfgrgtrmlbkrtmbonrmotbnrmotbnrtrontgzerzerzerzrzerzrzaaaaaaaaaaaaaaaaaaaaamotbnrmotbnrtrontgzerzerzerzrzerzrzaaaaaaaaaaaaaaaaaaaaa"

But with 1 added byte this failed :
# Invalid request with metadata (257 bytes)
curl -i http://controller:8080/v1/AUTH_21f2a561d80345318e5092a87a0675f8/container1/helloworld.txt -X PUT -d "Hello" -H "Content-Type: text/html; charset=UTF-8" -H "X-Auth-Token: gAAAAABcuJCWipnlVuX_FftkPS0SGeqOLIdnKEiuSa1yNVV2yUe5q3ASb7lv4EqmUeq0x_Eu0BhNtWHh7e5p_Nx8qqp6fPW8BlT-_7gNsTb9K4iDQj7I7Hhf89GoD46QUPHGPVCAJgywykaCtA2dsiR7eSj6Ac2CHpGWDE9TACdQ462iL7jNEz0" -H "X-Object-Meta-Label: zerzerzerzrzerzrzrzrzrzerzrfgrgtrmlbkrtmbonrmotbnrmotbnrtrontgzerzerzerzrzerzrzaaaaaaaaaaaaaaaaaaaaazerzerzerzrzerzrzrzrzrzerzrfgrgtrmlbkrtmbonrmotbnrmotbnrtrontgzerzerzerzrzerzrzaaaaaaaaaaaaaaaaaaaaamotbnrmotbnrtrontgzerzerzerzrzerzrzaaaaaaaaaaaaaaaaaaaaaa"

With the log :
Apr 18 17:00:13 controller proxy-server: ERREUR Exception non gérée dans la demande:
#012Traceback (most recent call last):
#012 File "/usr/lib/python2.7/site-packages/swift/proxy/server.py", line 527, in handle_request
#012 return handler(req)
#012 File "/usr/lib/python2.7/site-packages/swift/proxy/controllers/base.py", line 288, in wrapped
#012 return func(*a, **kw)
#012 File "/usr/lib/python2.7/site-packages/swift/proxy/controllers/obj.py", line 828, in PUT
#012 req, data_source, nodes, partition, outgoing_headers)
#012 File "/usr/lib/python2.7/site-packages/swift/proxy/controllers/obj.py", line 1021, in _store_object
#012 self._get_put_responses(req, putters, len(nodes))
#012 File "/usr/lib/python2.7/site-packages/swift/proxy/controllers/obj.py", line 483, in _get_put_responses
#012 _handle_response(putter, response)
#012 File "/usr/lib/python2.7/site-packages/swift/proxy/controllers/obj.py", line 479, in _handle_response
#012 etags.add(response.getheader('etag').strip('"'))
#012AttributeError: 'NoneType' object has no attribute 'strip' (txn: tx650ca90e454b445eb7075-005cb890fd) (client_ip: <ip_proxy_swift>)
Apr 18 17:00:13 controller proxy-server: <ip_proxy_swift> <ip_proxy_swift> 18/Apr/2019/15/00/13 PUT /v1/AUTH_21f2a561d80345318e5092a87a0675f8/container1/helloworld.txt HTTP/1.0 500 - curl/7.29.0 gAAAAABcuJCWipnl... 5 125 - tx650ca90e454b445eb7075-005cb890fd - 0.0386 - - 1555599613.684866905 1555599613.723479033 0

Bellego (fbellego)
description: updated
description: updated
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.