supervisor v3.0.a4 Release Notes

Release Date: 2008-01-30 // about 16 years ago
    • 3.0a3 broke Python 2.3 backwards compatibility.

    • On Debian Sarge, one user reported that a call to options.mktempfile would fail with an "[Errno 9] Bad file descriptor" at supervisord startup time. I was unable to reproduce this, but we found a workaround that seemed to work for him and it's included in this release. See http://www.plope.com/software/collector/252 for more information. Thanks to William Dode.

    • ๐Ÿšš The fault ALREADY_TERMINATED has been removed. It was only raised by supervisor.sendProcessStdin(). That method now returns NOT_RUNNING for parity with the other methods. (Mike Naberezny)

    • ๐Ÿšš The fault TIMED_OUT has been removed. It was not used.

    • Supervisor now depends on meld3 0.6.4, which does not compile its C extensions by default, so there is no more need to faff around with NO_MELD3_EXTENSION_MODULES during installation if you don't have a C compiler or the Python development libraries on your system.

    • Instead of making a user root around for the sample.conf file, provide a convenience command "echo_supervisord_conf", which he can use to echo the sample.conf to his terminal (and redirect to a file appropriately). This is a new user convenience (especially one who has no Python experience).

    • โž• Added numprocs_start config option to [program:x] and [eventlistener:x] sections. This is an offset used to compute the first integer that numprocs will begin to start from. Contributed by Antonio Beamud Montero.

    • โž• Added capability for [include] config section to config format. This section must contain a single key "files", which must name a space-separated list of file globs that will be included in supervisor's configuration. Contributed by Ian Bicking.

    • Invoking the reload supervisorctl command could trigger a bug in supervisord which caused it to crash. See http://www.plope.com/software/collector/253 . Thanks to William Dode for a bug report.

    • The pidproxy script was made into a console script.

    • The password value in both the [inet_http_server] and [unix_http_server] sections can now optionally be specified as a SHA hexdigest instead of as cleartext. Values prefixed with {SHA} will be considered SHA hex digests. To encrypt a password to a form suitable for pasting into the configuration file using Python, do, e.g.::

      import sha '{SHA}' + sha.new('thepassword').hexdigest() '{SHA}82ab876d1387bfafe46cc1c8a2ef074eae50cb1d'

    • The subtypes of the events PROCESS_STATE_CHANGE (and PROCESS_STATE_CHANGE itself) have been removed, replaced with a simpler set of PROCESS_STATE subscribable event types.

    The new event types are:

    PROCESS_STATE_STOPPED
    PROCESS_STATE_EXITED
    PROCESS_STATE_STARTING
    PROCESS_STATE_STOPPING
    PROCESS_STATE_BACKOFF
    PROCESS_STATE_FATAL
    PROCESS_STATE_RUNNING
    PROCESS_STATE_UNKNOWN
    PROCESS_STATE # abstract
    

    PROCESS_STATE_STARTING replaces:

    PROCESS_STATE_CHANGE_STARTING_FROM_STOPPED
    PROCESS_STATE_CHANGE_STARTING_FROM_BACKOFF
    PROCESS_STATE_CHANGE_STARTING_FROM_EXITED
    PROCESS_STATE_CHANGE_STARTING_FROM_FATAL
    

    PROCESS_STATE_RUNNING replaces PROCESS_STATE_CHANGE_RUNNING_FROM_STARTED

    PROCESS_STATE_BACKOFF replaces PROCESS_STATE_CHANGE_BACKOFF_FROM_STARTING

    PROCESS_STATE_STOPPING replaces:

    PROCESS_STATE_CHANGE_STOPPING_FROM_RUNNING
    PROCESS_STATE_CHANGE_STOPPING_FROM_STARTING
    

    PROCESS_STATE_EXITED replaces PROCESS_STATE_CHANGE_EXITED_FROM_RUNNING

    PROCESS_STATE_STOPPED replaces PROCESS_STATE_CHANGE_STOPPED_FROM_STOPPING

    PROCESS_STATE_FATAL replaces PROCESS_STATE_CHANGE_FATAL_FROM_BACKOFF

    PROCESS_STATE_UNKNOWN replaces PROCESS_STATE_CHANGE_TO_UNKNOWN

    PROCESS_STATE replaces PROCESS_STATE_CHANGE

    The PROCESS_STATE_CHANGE_EXITED_OR_STOPPED abstract event is gone.

    All process state changes have at least "processname", "groupname", and "from_state" (the name of the previous state) in their serializations.

    PROCESS_STATE_EXITED additionally has "expected" (1 or 0) and "pid" (the process id) in its serialization.

    PROCESS_STATE_RUNNING, PROCESS_STATE_STOPPING, PROCESS_STATE_STOPPED additionally have "pid" in their serializations.

    PROCESS_STATE_STARTING and PROCESS_STATE_BACKOFF have "tries" in their serialization (initially "0", bumped +1 each time a start retry happens).

    • โœ‚ Remove documentation from README.txt, point people to http://supervisord.org/manual/ .

    • The eventlistener request/response protocol has changed. OK/FAIL must now be wrapped in a RESULT envelope so we can use it for more specialized communications.

    Previously, to signify success, an event listener would write the string OK\n to its stdout. To signify that the event was seen but couldn't be handled by the listener and should be rebuffered, an event listener would write the string FAIL\n to its stdout.

    In the new protocol, the listener must write the string::

    RESULT {resultlen}\n{result}
    

    For example, to signify OK::

    RESULT 2\nOK
    

    To signify FAIL::

    RESULT 4\nFAIL
    

    See the scripts/sample_eventlistener.py script for an example.

    • To provide a hook point for custom results returned from event handlers (see above) the [eventlistener:x] configuration sections now accept a "result_handler=" parameter, e.g. "result_handler=supervisor.dispatchers:default_handler" (the default) or "handler=mypackage:myhandler". The keys are pkgutil "entry point" specifications (importable Python function names). Result handlers must be callables which accept two arguments: one named "event" which represents the event, and the other named "result", which represents the listener's result. A result handler either executes successfully or raises an exception. If it raises a supervisor.dispatchers.RejectEvent exception, the event will be rebuffered, and the eventhandler will be placed back into the ACKNOWLEDGED state. If it raises any other exception, the event handler will be placed in the UNKNOWN state. If it does not raise any exception, the event is considered successfully processed. A result handler's return value is ignored. Writing a result handler is a "in case of emergency break glass" sort of thing, it is not something to be used for arbitrary business code. In particular, handlers must not block for any appreciable amount of time.

    The standard eventlistener result handler (supervisor.dispatchers:default_handler) does nothing if it receives an "OK" and will raise a supervisor.dispatchers.RejectEvent exception if it receives any other value.

    • Supervisord now emits TICK events, which happen every N seconds. Three types of TICK events are available: TICK_5 (every five seconds), TICK_60 (every minute), TICK_3600 (every hour). Event listeners may subscribe to one of these types of events to perform every-so-often processing. TICK events are subtypes of the EVENT type.

    • Get rid of OSX platform-specific memory monitor and replace with memmon.py, which works on both Linux and Mac OS. This script is now a console script named "memmon".

    • ๐Ÿ‘ Allow "web handler" (the handler which receives http requests from browsers visiting the web UI of supervisor) to deal with POST requests.

    • RPC interface methods stopProcess(), stopProcessGroup(), and stopAllProcesses() now take an optional "wait" argument that defaults to True for parity with the start methods.