3.0a3 (2007-10-02)

  • Supervisorctl now reports a better error message when the main supervisorXML-RPC namespace is not registered. Thanks to Mike Orr for reportingthis. (Mike Naberezny)

  • Create scripts directory within supervisor package, movepidproxy.py there, and place sample event listener and comm eventprograms within the directory.

  • When an event notification is buffered (either because a listener rejectedit or because all listeners were busy when we attempted to send itoriginally), we now rebuffer it in a way that will result in it beingretried earlier than it used to be.

  • When a listener process exits (unexpectedly) before transitioning from theBUSY state, rebuffer the event that was being processed.

  • supervisorctl tail command now accepts a trailing specifier: stderror stdout, which respectively, allow a user to tail the stderr orstdout of the named process. When this specifier is not provided, taildefaults to stdout.

  • supervisor clear command now clears both stderr and stdout logs for thegiven process.

  • When a process encounters a spawn error as a result of a failed execve orwhen it cannot setuid to a given uid, it now puts this info into theprocess’ stderr log rather than its stdout log.

  • The event listener protocol header now contains the server identifier,the pool that the event emanated from, and the poolserial as wellas the values it previously contained (version, event name, serial, andlength). The server identifier is taken from the config file options valueidentifier, the pool value is the name of the listener pool thatthis event emanates from, and the poolserial is a serial numberassigned to the event local to the pool that is processing it.

  • The event listener protocol header is now a sequence of key-valuepairs rather than a list of positional values. Previously, arepresentative header looked like:

  1. SUPERVISOR3.0 PROCESS_COMMUNICATION_STDOUT 30 22\n

Now it looks like:

  1. ver:3.0 server:supervisor serial:21 ...
  • Specific event payload serializations have changed. All eventtypes that deal with processes now include the pid of the processthat the event is describing. In event serialization “header”values, we’ve removed the space between the header name and thevalue and headers are now separated by a space instead of a linefeed. The names of keys in all event types have had underscoresremoved.

  • Abandon the use of the Python stdlib logging module for speedand cleanliness purposes. We’ve rolled our own.

  • Fix crash on start if AUTO logging is used with a max_bytes ofzero for a process.

  • Improve process communication event performance.

  • The process config parameters stdout_capturefile andstderr_capturefile are no longer valid. They have been replaced withthe stdout_capture_maxbytes and stderr_capture_maxbytes parameters,which are meant to be suffix-multiplied integers. They both default tozero. When they are zero, process communication event capturing is notperformed. When either is nonzero, the value represents the maximum numberof bytes that will be captured between process event start and end tags.This change was to support the fact that we no longer keep capture data ina separate file, we just use a FIFO in RAM to maintain capture info. Forusers whom don’t care about process communication events, or whom haven’tchanged the defaults for stdout_capturefile or stderr_capturefile,they needn’t do anything to their configurations to deal with this change.

  • Log message levels have been normalized. In particular, processstdin/stdout is now logged at debug level rather than at tracelevel (trace level is now reserved for output useful typically fordebugging supervisor itself). See “Supervisor Log Levels” in thedocumentation for more info.

  • When an event is rebuffered (because all listeners are busy or alistener rejected the event), the rebuffered event is now insertedin the head of the listener event queue. This doesn’t guaranteeevent emission in natural ordering, because if a listener rejectsan event or dies while it’s processing an event, it can take anarbitrary amount of time for the event to be rebuffered, and otherevents may be processed in the meantime. But if pool listenersnever reject an event or don’t die while processing an event, thisguarantees that events will be emitted in the order that they werereceived because if all listeners are busy, the rebuffered eventwill be tried again “first” on the next go-around.

  • Removed EVENT_BUFFER_OVERFLOW event type.

  • The supervisorctl xmlrpc proxy can now communicate withsupervisord using a persistent HTTP connection.

  • A new module “supervisor.childutils” was added. This moduleprovides utilities for Python scripts which act as children ofsupervisord. Most notably, it contains an API method“getRPCInterface” allows you to obtain an xmlrpclib ServerProxythat is willing to communicate with the parent supervisor. Italso contains utility functions that allow for parsing ofsupervisor event listener protocol headers. A pair of scripts(loop_eventgen.py and loop_listener.py) were added to the scriptdirectory that serve as examples about how to use the childutilsmodule.

  • A new envvar is added to child process environments:SUPERVISOR_SERVER_URL. This contains the server URL for thesupervisord running the child.

  • An OK URL was added at /ok.html which just returns the stringOK (can be used for up checks or speed checks via plain-old-HTTP).

  • An additional command-line option —profile_options is acceptedby the supervisord script for developer use:

  1. supervisord -n -c sample.conf --profile_options=cumulative,calls

The values are sort_stats options that can be passed to thestandard Python profiler’s PStats sort_stats method.

When you exit supervisor, it will print Python profiling output tostdout.

  • If cElementTree is installed in the Python used to invokesupervisor, an alternate (faster, by about 2X) XML parser will beused to parse XML-RPC request bodies. cElementTree was added asan “extras_require” option in setup.py.

  • Added the ability to start, stop, and restart process groups tosupervisorctl. To start a group, use startgroupname:. To startmultiple groups, use startgroupname1:groupname2:*. Equivalentcommands work for “stop” and “restart”. You can mix and match shortprocessnames, fullly-specified group:process names, and groupsplats on thesame line for any of these commands.

  • Added directory option to process config. If you set thisoption, supervisor will chdir to this directory before executingthe child program (and thus it will be the child’s cwd).

  • Added umask option to process config. If you set this option,supervisor will set the umask of the child program. (Thanks toIan Bicking for the suggestion).

  • A pair of scripts osx_memmon_eventgen.py and _osx_memmon_listener.py`_have been added to the scripts directory. If they are used together asdescribed in their comments, processes which are consuming “too much”memory will be restarted. The eventgen script only works on OSX (mymain development platform) but it should be trivially generalizable toother operating systems.

  • The long form —configuration (-c) command line option forsupervisord was broken. Reported by Mike Orr. (Mike Naberezny)

  • New log level: BLAT (blather). We log allsupervisor-internal-related debugging info here. Thanks to MikeOrr for the suggestion.

  • We now allow supervisor to listen on both a UNIX domain socket and an inetsocket instead of making them mutually exclusive. As a result, the options“http_port”, “http_username”, “http_password”, “sockchmod” and “sockchown”are no longer part of the [supervisord] section configuration. Thesehave been supplanted by two other sections: [unix_http_server] and[inet_http_server]. You’ll need to insert one or the other (dependingon whether you want to listen on a UNIX domain socket or a TCP socketrespectively) or both into your supervisord.conf file. These sections havetheir own options (where applicable) for port, username, password, chmod,and chown. See README.txt for more information about these sections.

  • All supervisord command-line options related to “http_port”,“http_username”, “http_password”, “sockchmod” and “sockchown” havebeen removed (see above point for rationale).

  • The option that used to be sockchown within the [supervisord]section (and is now named chown within the [unix_http_server]section) used to accept a dot-separated user.group value. The separatornow must be a colon ”:”, e.g. “user:group”. Unices allow for dots inusernames, so this change is a bugfix. Thanks to Ian Bicking for the bugreport.

  • If a ‘-c’ option is not specified on the command line, both supervisord andsupervisorctl will search for one in the paths ./supervisord.conf ,./etc/supervisord.conf (relative to the current working dir whensupervisord or supervisorctl is invoked) or in /etc/supervisord.conf(the old default path). These paths are searched in order, and supervisordand supervisorctl will use the first one found. If none are found,supervisor will fail to start.

  • The Python string expression %(here)s (referring to the directory inwhich the the configuration file was found) can be used within thefollowing sections/options within the config file:

  1. unix_http_server:file
  2. supervisor:directory
  3. supervisor:logfile
  4. supervisor:pidfile
  5. supervisor:childlogdir
  6. supervisor:environment
  7. program:environment
  8. program:stdout_logfile
  9. program:stderr_logfile
  10. program:process_name
  11. program:command
  • The —environment aka -b option was removed from the list ofavailable command-line switches to supervisord (use “A=1 B=2bin/supervisord” instead).

  • If the socket filename (the tail-end of the unix:// URL) waslonger than 64 characters, supervisorctl would fail with anencoding error at startup.

  • The identifier command-line argument was not functional.

  • Fixed http://www.plope.com/software/collector/215 (bad errormessage in supervisorctl when program command not found on PATH).

  • Some child processes may not have been shut down properly atsupervisor shutdown time.

  • Move to ZPL-derived (but not ZPL) license available fromhttp://www.repoze.org/LICENSE.txt; it’s slightly less restrictivethan the ZPL (no servicemark clause).

  • Spurious errors related to unclosed files (“bad file descriptor”,typically) were evident at supervisord “reload” time (when usingthe “reload” command from supervisorctl).

  • We no longer bundle ez_setup to bootstrap setuptools installation.