py3 TypeError WSGI responses must be bytes

Bug #1914081 reported by Bhaskar Singhal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
In Progress
Undecided
Unassigned

Bug Description

Hello All,

Before any object is marked for expiring, the object-expirer keeps failing with the following error

Jan 31 13:00:15.464162 hostname swift [7863]: ERROR with Account server 150.50.3.109:8501/volume-00011d49 re: Trying to HEAD /v1/.expiring_objects: ConnectionTimeout (0.5s) (txn: txffb2b8b13a2f4cc1a27ad-006016a9d8)
Jan 31 13:00:19.411485 hostname swift [7863]: ERROR Unhandled exception in request: #012Traceback (most recent call last):#012 File "/usr/lib/python3/dist-packages/swift/proxy/server.py", line 680, in handle_request#012 resp = handler(req)#012 File "/usr/lib/python3/dist-packages/swift/proxy/controllers/base.py", line 2122, in HEAD#012 return self.GETorHEAD(req)#012 File "/usr/lib/python3/dist-packages/swift/proxy/controllers/account.py", line 74, in GETorHEAD#012 req.swift_entity_path.rstrip('/'), concurrency)#012 File "/usr/lib/python3/dist-packages/swift/proxy/controllers/base.py", line 2186, in GETorHEAD_base#012 headers=handler.source_headers)#012 File "/usr/lib/python3/dist-packages/swift/proxy/controllers/base.py", line 2053, in best_response#012 quorum_size=quorum_size)#012 File "/usr/lib/python3/dist-packages/swift/proxy/controllers/base.py", line 2096, in _compute_quorum_response#012 resp.body = bodies[status_index]#012 File "/usr/lib/python3/dist-packages/swift/common/swob.py", line 387, in setter#012 raise TypeError('WSGI responses must be bytes')#012TypeError: WSGI responses must be bytes (txn: txffb2b8b13a2f4cc1a27ad-006016a9d8)
Jan 31 13:00:19.469340 hostname object-expirer [7863]: Unhandled exception: #012Traceback (most recent call last):#012 File "/usr/lib/python3/dist-packages/swift/obj/expirer.py", line 323, in run_once#012 self.swift.get_account_info(task_account)#012 File "/usr/lib/python3/dist-packages/swift/common/internal_client.py", line 435, in get_account_info#012 resp = self.make_request('HEAD', path, {}, acceptable_statuses)#012 File "/usr/lib/python3/dist-packages/swift/common/internal_client.py", line 229, in make_request#012 raise UnexpectedResponse(msg, resp)#012swift.common.internal_client.UnexpectedResponse: Unexpected response: 500 Internal Error (txn: txffb2b8b13a2f4cc1a27ad-006016a9d8)

A similar issue can also be observed in _make_node_request (https://github.com/openstack/swift/blob/master/swift/proxy/controllers/base.py#L1390) where instead of appending b'' we are appending ''

Regards,
Bhaskar

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/swift/+/811001

Changed in swift:
status: New → In Progress
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.