clarify exception message when bulk tarfile read errors occur in proxy PUT path
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
New
|
Low
|
Unassigned |
Bug Description
Bulk middleware can raise a tarfile.ReadError which is not explicitly handled in the proxy object controller PUT path so ends up being handled by the catch-all except clause [1] resulting in a log message "proxy-server: ERROR Exception transferring data to object servers" [2]. This is technically correct (the method is transferring data from the source to the object servers) but in contrast to the other error logs that might be raised in that method (e.g. "Client disconnected without sending last chunk"), this one suggests a problem in the proxy-backend communication, which is not the current case.
Possible solutions include:
1. catch the ReadError in bulk middleware and convert to a swift exception (ChunkReadError perhaps?). The core proxy code shouldn't need to know about tarfile exceptions.
2. change the error message if it only ever relates to *reading* errors rather than sending errors (requires further research).
[2]
proxy-server: ERROR Exception transferring data to object servers {'path': XXXXXX}:
Traceback (most recent call last):
File "/opt/ss/
chunk = next(data_source)
File "/opt/ss/
self.app.
File "/opt/ss/
return self.readChunk(
File "/opt/ss/
chunk = read_method(*args, **kwargs)
File "/opt/ss/
buf += self.fileobj.
File "/opt/ss/
return self.readnormal
File "/opt/ss/
return self.__read(size)
File "/opt/ss/
raise ReadError(
ReadError: unexpected end of data (txn: tx28f302bb927c4