swift/test/unit
Darrell Bishop 1107f24179 Seamlessly reload servers with SIGUSR1
Swift servers can now be seamlessly reloaded by sending them a SIGUSR1
(instead of a SIGHUP).  The server forks off a synchronized child to
wait to close the old listen socket(s) until the new server has started
up and bound its listen socket(s).  The new server is exec'ed from the
old one so its PID doesn't change.  This makes Systemd happier, so a
ReloadExec= stanza can now be used.

The seamless part means that incoming connections will alwyas get
accepted either by the old server or the new one.  This eliminates
client-perceived "downtime" during server reloads, while allowing the
server to fully reload, re-reading configuration, becoming a fresh
Python interpreter instance, etc.  The SO_REUSEPORT socket option has
already been getting used, so nothing had to change there.

This patch also includes a non-invasive fix for a current eventlet bug;
see https://github.com/eventlet/eventlet/pull/590
That bug prevents a SIGHUP "reload" from properly servicing existing
requests before old worker processes close sockets and exit.  The
existing probtests missed this, but the new ones, in this patch, caught
it.

New probe tests cover both old SIGHUP "reload" behavior as well as the
new SIGUSR1 seamless reload behavior.

Change-Id: I3e5229d2fb04be67e53533ff65b0870038accbb7
2019-11-07 10:15:26 -08:00
..
account Refactor timestamp iter in db backend tests 2019-10-26 16:50:32 -05:00
cli Add commands to ring-builder to change region / zone 2019-10-04 21:56:12 -07:00
common Seamlessly reload servers with SIGUSR1 2019-11-07 10:15:26 -08:00
container Refactor timestamp iter in db backend tests 2019-10-26 16:50:32 -05:00
obj Consistently use io.BytesIO 2019-10-15 15:09:46 +02:00
proxy Consistently use io.BytesIO 2019-10-15 15:09:46 +02:00
test_locale py3: port the test of locale 2019-06-19 09:54:14 -07:00
__init__.py Consistently use io.BytesIO 2019-10-15 15:09:46 +02:00
helpers.py tests/py3: Improve header casing 2019-08-26 14:44:05 -07:00