swift/test
Clay Gerrard c2ce92acd6 Fix signal handling for daemons with InternalClient
The intentional use of "bare except" handling in catch_errors and some
daemons to prevent propagation on unexpected errors that do not
inherit from Exception (like eventlet.Timeout) or even BaseException
(like old-style classes) has the side effect of spuriously "handling"
*expected* errors like when a signal handler raises SystemExit.

The signal handler installed in our Daemon is intended to ensure first
that the entire process group and any forked processes (like rsync's)
receive the SIGTERM signal and also that the process itself
terminates.

The use of sys.exit was not a concious grandiose plans for graceful
shutdown (like the running[0] = False trick that wsgi server parent
process do) - the desired behavior for SIGTERM is to stop - hard.

This change ensures the original goals and intentions of our signal
handler are fulfilled without the undesirable side effect that can
cause our daemons to confusingly log an expected message to stop as an
unexpected error, and start ignoring additional SIGTERM messages;
forcing our kind operators to resort to brutal process murder.

Closes-Bug: #1489209
Change-Id: I9d2886611f6db2498cd6a8f81a58f2a611f40905
2016-11-04 20:00:00 -07:00
..
functional Merge "Add functional test for access control (RBAC INFO) with Keystone" 2016-10-06 00:43:16 +00:00
probe Fix signal handling for daemons with InternalClient 2016-11-04 20:00:00 -07:00
unit Fix signal handling for daemons with InternalClient 2016-11-04 20:00:00 -07:00
__init__.py test/(functional/probe):Replace python print operator with print function (pep H233, py33) 2015-08-20 11:42:58 +09:00
sample.conf Merge "Add a note for functional tests with Keystone." 2016-03-18 05:08:10 +00:00