Comment 11 for bug 795025

Revision history for this message
John A Meinel (jameinel) wrote :

I grepped the Launchpad source code and found:
./lib/canonical/launchpad/webapp/sigusr1.py

Which says:
To aid debugging, we install a handler for the SIGUSR1 signal. When
received, a summary of the last request, recent OOPS IDs and last
executed SQL statement is printed for each thread.

So it doesn't sound like "quiesce". There is also "RotatableFileLogObserver" where SIGUSR1 is used to re-open the log file (presumably after it has been rotated.)

there is also:
./lib/canonical/launchpad/webapp/sigusr2.py

Which says it rotates log files on SIGUSR2 (I'm not sure why the differences.)

the mailmain code talks a lot about SIGHUP. There is also:
./lib/canonical/launchpad/webapp/sighup.py
Which says:
def sighup_handler(signum, frame):
    """Switch the state of the HAProxy going_down flag."""
    haproxy.switch_going_down_flag()
    logging.getLogger('sighup').info(
        'Received SIGHUP, swiched going_down flag to %s' %
        haproxy.going_down_flag)

So it sounds like SIGHUP is the "quiesce" signal. So I'll re-use that. Looking at the haproxy code, it looks like that does, indeed, tell haproxy tell this webapp to start telling haproxy that it is no longer available.