Eventlet 0.22.0+ changed how graceful shutdowns work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
New
|
Undecided
|
Unassigned |
Bug Description
This causes failures in test/probe/
ERROR: test_account_
-------
Traceback (most recent call last):
File "/vagrant/
self.
File "/vagrant/
conn.send(body)
File "/usr/lib/
self.
File "/usr/lib/
return getattr(
error: [Errno 32] Broken pipe
The issue boils down to a change in how eventlet handles graceful shutdowns. Previously (following [1]), our server processes would continue handling requests indefinitely from any open connections and wait for the client to close the connection before completely shutting down. Now (with [2]) eventlet will close the connections between pipelined requests. This followed some bug reports [3][4] complaining about long-lived server processes (which we've "solved" with swift-orphans), and it seems to be consistent with how (some?) other HTTP servers behave [5].
At the moment, this presents a slight inconvenience to clients (who will find their connection unexpectedly closed; there's no Connection: close header being sent), but they should be tolerant of such errors and know to get a new connection and retry the request. This should not greatly impact proxy <-> backend communications at the moment, as backend requests are not pipelined.
This definitely *is* a pitfall that needs to be considered for protocol enhancements that would add pipelined requests, however. In particular, replacing the multipart-MIME protocol with PUT/POST/POST or STAGE/UPDATE/COMMIT [6] should probably keep this in mind and (1) not require any in-process state between requests and (2) be willing to try a new connection to the same backend server before declaring the Putter failed. Otherwise, graceful restarts will have an increased risk of PUT failures and/or creating non-durable fragments.
[1] https:/
[2] https:/
[3] https:/
[4] https:/
[5] http://
[6] https:/
Reviewed: https:/ /review. openstack. org/602526 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=050f8799ca8 2f121f9d33c7e77 3b982b9763f074
Committed: https:/
Submitter: Zuul
Branch: master
commit 050f8799ca82f12 1f9d33c7e773b98 2b9763f074
Author: Tim Burke <email address hidden>
Date: Fri Sep 14 04:42:34 2018 +0000
Use latest eventlet in probe tests
Note that eventlet 0.22.0+ closes connections between requests when
it stops accepting connections.
Partial-Bug: #1792615 0e8d797acc3423a 917e809ffdb
Change-Id: Ia8d9ab95e2aad4