summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorDarrell Bishop <darrell@swiftstack.com>2019-10-25 12:48:36 -0700
committerDarrell Bishop <darrell@swiftstack.com>2019-11-07 10:15:26 -0800
commit1107f24179c0c6fdcb58771f3a6e6c025352b5d3 (patch)
tree6ef09f471d87b17877000cdc959214fe594b7c9e /tox.ini
parent281ffab2a52f348aa3f8ad39e800a43c6047e1cf (diff)
downloadswift-1107f24179c0c6fdcb58771f3a6e6c025352b5d3.tar.gz
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
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini5
1 files changed, 3 insertions, 2 deletions
diff --git a/tox.ini b/tox.ini
index 292f34a83..6044e7d04 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,12 +9,13 @@ install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
NOSE_WITH_COVERAGE=1
NOSE_COVER_BRANCHES=1
+ NOSE_COVER_HTML_DIR={toxinidir}/cover
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-commands = find . ( -type f -o -type l ) -name "*.py[co]" -delete
- find . -type d -name "__pycache__" -delete
+commands = find {envdir} ( -type f -o -type l ) -name "*.py[co]" -delete
+ find {envdir} -type d -name "__pycache__" -delete
nosetests {posargs:test/unit}
whitelist_externals = find
rm