Object server should reply 507, not 500, when disk fills up
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
In Progress
|
Undecided
|
Unassigned |
Bug Description
When the client includes a Content-Length, things work as expected:
Jul 21 21:02:50 saio object-6040: 127.0.0.1 - - [21/Jul/
Jul 21 21:02:50 saio proxy-server: ERROR Insufficient Storage 127.0.0.4:6040/sdb4 (txn: txa9da7df20c7c4
Jul 21 21:02:50 saio object-6020: 127.0.0.1 - - [21/Jul/
Jul 21 21:02:50 saio proxy-server: ERROR Insufficient Storage 127.0.0.2:6020/sdb2 (txn: txa9da7df20c7c4
Jul 21 21:02:50 saio object-6030: 127.0.0.1 - - [21/Jul/
Jul 21 21:02:50 saio proxy-server: ERROR Insufficient Storage 127.0.0.3:6030/sdb3 (txn: txa9da7df20c7c4
Jul 21 21:02:50 saio object-6010: 127.0.0.1 - - [21/Jul/
Jul 21 21:02:50 saio proxy-server: ERROR Insufficient Storage 127.0.0.1:6010/sdb1 (txn: txa9da7df20c7c4
Jul 21 21:02:50 saio proxy-server: Object PUT returning 503, 0/2 required connections (txn: txa9da7df20c7c4
Jul 21 21:02:50 saio proxy-server: 127.0.0.1 127.0.0.1 21/Jul/
But when the client sends it chunked...
Jul 21 21:08:37 saio object-6040: ERROR __call__ error with PUT /sdb4/998/
Jul 21 21:08:37 saio object-6030: ERROR __call__ error with PUT /sdb3/998/
Jul 21 21:08:37 saio object-6020: ERROR __call__ error with PUT /sdb2/998/
Jul 21 21:08:37 saio object-6020: 127.0.0.1 - - [21/Jul/
Jul 21 21:08:37 saio object-6030: 127.0.0.1 - - [21/Jul/
Jul 21 21:08:37 saio object-6040: 127.0.0.1 - - [21/Jul/
Jul 21 21:08:37 saio proxy-server: ERROR with Object server 127.0.0.4:6040/sdb4 re: Trying to write to /AUTH_test/c2/o:
Traceback (most recent call last):
File "/vagrant/
self.
File "/usr/lib/
self.
File "/usr/local/
tail = self.send(data, flags)
File "/usr/local/
return self._send_
File "/usr/local/
return send_method(data, *args)
error: [Errno 32] Broken pipe (txn: tx896c3280e4924
... ^^^ a couple more times ...
Jul 21 21:08:37 saio proxy-server: Object PUT exceptions during send, 0/2 required connections (txn: tx896c3280e4924
Jul 21 21:08:37 saio proxy-server: 127.0.0.1 127.0.0.1 21/Jul/
We should be able to catch that ENOSPC and return 507.
This also has implications with the framing issues seen in https:/ /bugs.launchpad .net/swift/ +bug/1709185 and https:/ /github. com/eventlet/ eventlet/ pull/578; I was just uploading from /dev/zero like
$ curl http:// saio:8090/ v1/AUTH_ test/c2/ o -T /dev/zero
and would see some logs like
Jul 21 21:08:37 saio proxy-server: ERROR WSGI: code 400, message Bad request syntax ('\x00\x00...
afterwards -- followed by a badly-formatted traceback coming up out of eventlet:
Jul 21 21:08:37 saio proxy-server: STDERR: Traceback (most recent call last): lib/python2. 7/dist- packages/ eventlet/ hubs/hub. py", line 461, in fire_timers lib/python2. 7/dist- packages/ eventlet/ hubs/timer. py", line 59, in __call__ lib/python2. 7/dist- packages/ eventlet/ event.py" , line 175, in _do_send switch( result) lib/python2. 7/dist- packages/ eventlet/ greenthread. py", line 221, in main lib/python2. 7/dist- packages/ eventlet/ wsgi.py" , line 818, in process_request _init__ (conn_state, self) swift/swift/ common/ wsgi.py" , line 421, in __init__ ol.__init_ _(self, *args, **kwargs) lib/python2. 7/dist- packages/ eventlet/ wsgi.py" , line 357, in __init__ lib/python2. 7/dist- packages/ eventlet/ wsgi.py" , line 390, in handle one_request( ) swift/swift/ common/ wsgi.py" , line 541, in handle_one_request ol.handle_ one_request( self) lib/python2. 7/dist- packages/ eventlet/ wsgi.py" , line 431, in handle_one_request request( ): swift/swift/ common/ wsgi.py" , line 482, in parse_request ol.parse_ request( self) python2. 7/BaseHTTPServe r.py", line 286, in parse_request error(400, "Bad request syntax (%r)" % requestline) python2. 7/BaseHTTPServe r.py", line 384, in send_error write(content)
Jul 21 21:08:37 saio proxy-server: STDERR: File "/usr/local/
Jul 21 21:08:37 saio proxy-server: STDERR: timer()
Jul 21 21:08:37 saio proxy-server: STDERR: File "/usr/local/
Jul 21 21:08:37 saio proxy-server: STDERR: cb(*args, **kw)
Jul 21 21:08:37 saio proxy-server: STDERR: File "/usr/local/
Jul 21 21:08:37 saio proxy-server: STDERR: waiter.
Jul 21 21:08:37 saio proxy-server: STDERR: File "/usr/local/
Jul 21 21:08:37 saio proxy-server: STDERR: result = function(*args, **kwargs)
Jul 21 21:08:37 saio proxy-server: STDERR: File "/usr/local/
Jul 21 21:08:37 saio proxy-server: STDERR: proto._
Jul 21 21:08:37 saio proxy-server: STDERR: File "/vagrant/
Jul 21 21:08:37 saio proxy-server: STDERR: wsgi.HttpProtoc
Jul 21 21:08:37 saio proxy-server: STDERR: File "/usr/local/
Jul 21 21:08:37 saio proxy-server: STDERR: self.handle()
Jul 21 21:08:37 saio proxy-server: STDERR: File "/usr/local/
Jul 21 21:08:37 saio proxy-server: STDERR: self.handle_
Jul 21 21:08:37 saio proxy-server: STDERR: File "/vagrant/
Jul 21 21:08:37 saio proxy-server: STDERR: got = wsgi.HttpProtoc
Jul 21 21:08:37 saio proxy-server: STDERR: File "/usr/local/
Jul 21 21:08:37 saio proxy-server: STDERR: if not self.parse_
Jul 21 21:08:37 saio proxy-server: STDERR: File "/vagrant/
Jul 21 21:08:37 saio proxy-server: STDERR: return wsgi.HttpProtoc
Jul 21 21:08:37 saio proxy-server: STDERR: File "/usr/lib/
Jul 21 21:08:37 saio proxy-server: STDERR: self.send_
Jul 21 21:08:37 saio proxy-server: STDERR: File "/usr/lib/
Jul 21 21:08:37 saio proxy-server: STDERR: self.wfile.
Jul 21 21:08:37 saio proxy-server: STDERR: File "/u...