CHANGES.txt 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915
  1. Next Release
  2. - Fixed a bug introduced in 3.0a7 where setup.py would not detect the
  3. Python version correctly. Patch by Daniele Paolella.
  4. 3.0a7
  5. - We now bundle our own patched version of Medusa contributed by Jason
  6. Kirtland to allow Supervisor to run on Python 2.6. This was done
  7. because Python 2.6 introduced backwards incompatible changes to
  8. asyncore and asynchat in the stdlib.
  9. - The console script ``memmon``, introduced in Supervisor 3.0a4, has
  10. been moved to Superlance (http://pypi.python.org/pypi/superlance).
  11. The Superlance package contains other useful monitoring tools designed
  12. to run under Supervisor.
  13. - Supervisorctl now correctly interprets all of the error codes that can
  14. be returned when starting a process. Patch by Francesc Alted.
  15. - New 'stdout_events_enabled' and 'stderr_events_enabled' config options
  16. have been added to the '[program:x]', '[fcgi-program:x]', and
  17. '[eventlistener:x]' sections. These enable the emitting of new
  18. PROCESS_LOG events for a program. If unspecified, the default is False.
  19. If enabled for a subprocess, and data is received from the stdout or
  20. stderr of the subprocess while not in the special capture mode used by
  21. PROCESS_COMMUNICATION, an event will be emitted.
  22. Event listeners can subscribe to either PROCESS_LOG_STDOUT or
  23. PROCESS_LOG_STDERR individually, or PROCESS_LOG for both.
  24. - Values for subprocess environment variables specified with environment=
  25. in supervisord.conf can now be optionally quoted, allowing them to
  26. contain commas. Patch by Tim Godfrey.
  27. - Added a new event type, REMOTE_COMMUNICATION, that is emitted by a new
  28. RPC method, supervisor.sendRemoteCommEvent().
  29. - Patch for bug #268 (KeyError on 'here' expansion for stdout/stderr_logfile)
  30. from David E. Kindred.
  31. - Add ``reread``, ``update``, and ``avail`` commands based on Anders
  32. Quist's ``online_config_reload.diff`` patch. This patch extends
  33. the "add" and "drop" commands with automagical behavior::
  34. In supervisorctl:
  35. supervisor> status
  36. bar RUNNING pid 14864, uptime 18:03:42
  37. baz RUNNING pid 23260, uptime 0:10:16
  38. foo RUNNING pid 14866, uptime 18:03:42
  39. gazonk RUNNING pid 23261, uptime 0:10:16
  40. supervisor> avail
  41. bar in use auto 999:999
  42. baz in use auto 999:999
  43. foo in use auto 999:999
  44. gazonk in use auto 999:999
  45. quux avail auto 999:999
  46. Now we add this to our conf:
  47. [group:zegroup]
  48. programs=baz,gazonk
  49. Then we reread conf:
  50. supervisor> reread
  51. baz: disappeared
  52. gazonk: disappeared
  53. quux: available
  54. zegroup: available
  55. supervisor> avail
  56. bar in use auto 999:999
  57. foo in use auto 999:999
  58. quux avail auto 999:999
  59. zegroup:baz avail auto 999:999
  60. zegroup:gazonk avail auto 999:999
  61. supervisor> status
  62. bar RUNNING pid 14864, uptime 18:04:18
  63. baz RUNNING pid 23260, uptime 0:10:52
  64. foo RUNNING pid 14866, uptime 18:04:18
  65. gazonk RUNNING pid 23261, uptime 0:10:52
  66. The magic make-it-so command:
  67. supervisor> update
  68. baz: stopped
  69. baz: removed process group
  70. gazonk: stopped
  71. gazonk: removed process group
  72. zegroup: added process group
  73. quux: added process group
  74. supervisor> status
  75. bar RUNNING pid 14864, uptime 18:04:43
  76. foo RUNNING pid 14866, uptime 18:04:43
  77. quux RUNNING pid 23561, uptime 0:00:02
  78. zegroup:baz RUNNING pid 23559, uptime 0:00:02
  79. zegroup:gazonk RUNNING pid 23560, uptime 0:00:02
  80. supervisor> avail
  81. bar in use auto 999:999
  82. foo in use auto 999:999
  83. quux in use auto 999:999
  84. zegroup:baz in use auto 999:999
  85. zegroup:gazonk in use auto 999:999
  86. - Fix bug with symptom "KeyError: 'process_name'" when using a logfile name
  87. including documented 'process_name' Python string expansions.
  88. - Tab completions in the supervisorctl shell, and a foreground mode
  89. for Supervisor, implemented as a part of GSoC.
  90. The supervisorctl program now has a 'fg' command, which makes it
  91. possible to supply inputs to a process, and see its output/error
  92. stream in real time.
  93. - Process config reloading implemented by Anders Quist. The
  94. supervisorctl program now has the commands "add" and "drop".
  95. "add <programname>" adds the process group implied by <programname>
  96. in the config file. "drop <programname>" removes the process
  97. group from the running configuration (it must already be stopped).
  98. This makes it possible to add processes to and remove processes from
  99. a running supervisord without restarting the supervisord process.
  100. - Fixed a bug where opening the HTTP servers would fail silently
  101. for socket errors other than errno.EADDRINUSE.
  102. - Thanks to Dave Peticolas, using "reload" against a supervisord
  103. that is running in the background no longer causes supervisord
  104. to crash.
  105. - Configuration options for logfiles now accept mixed case reserved
  106. words (e.g. "AUTO" or "auto") for consistency with other options.
  107. - childutils.eventdata was buggy, it could not deal with carriage returns
  108. in data. See http://www.plope.com/software/collector/257. Thanks
  109. to Ian Bicking.
  110. - Per-process exitcodes= configuration now will not accept exit
  111. codes that are not 8-bit unsigned integers (supervisord will not
  112. start when one of the exit codes is outside the range of 0 - 255).
  113. - Per-process 'directory' value can now contain expandable values
  114. like %(here)s. (See http://www.plope.com/software/collector/262).
  115. - Accepted patch from Roger Hoover to allow for a new sort of
  116. process group: "fcgi-program". Adding one of these to your
  117. supervisord.conf allows you to control fastcgi programs. FastCGI
  118. programs cannot belong to heterogenous groups.
  119. The configuration for FastCGI programs is the same as regular
  120. programs except an additional "socket" parameter. Substitution
  121. happens on the socket parameter with the 'here' and 'program_name'
  122. variables::
  123. [fcgi-program:fcgi_test]
  124. ;socket=tcp://localhost:8002
  125. socket=unix:///path/to/fcgi/socket
  126. - Supervisorctl now supports a plugin model for supervisorctl
  127. commands.
  128. - Added the ability to retrieve supervisord's own pid through
  129. supervisor.getPID() on the XML-RPC interface or a new
  130. "pid" command on supervisorctl.
  131. 3.0a6
  132. - The RotatingFileLogger had a race condition in its doRollover
  133. method whereby a file might not actually exist despite a call to
  134. os.path.exists on the line above a place where we try to remove
  135. it. We catch the exception now and ignore the missing file.
  136. 3.0a5
  137. - Supervisorctl now supports persistent readline history. To
  138. enable, add "history_file = <pathname>" to the '[supervisorctl']
  139. section in your supervisord.conf file.
  140. - Multiple commands may now be issued on one supervisorctl command
  141. line, e.g. "restart prog; tail -f prog". Separate commands with a
  142. single semicolon; they will be executed in order as you would
  143. expect.
  144. 3.0a4
  145. - 3.0a3 broke Python 2.3 backwards compatibility.
  146. - On Debian Sarge, one user reported that a call to
  147. options.mktempfile would fail with an "[Errno 9] Bad file
  148. descriptor" at supervisord startup time. I was unable to
  149. reproduce this, but we found a workaround that seemed to work for
  150. him and it's included in this release. See
  151. http://www.plope.com/software/collector/252 for more information.
  152. Thanks to William Dode.
  153. - The fault ALREADY_TERMINATED has been removed. It was only
  154. raised by supervisor.sendProcessStdin(). That method now returns
  155. NOT_RUNNING for parity with the other methods. (Mike Naberezny)
  156. - The fault TIMED_OUT has been removed. It was not used.
  157. - Supervisor now depends on meld3 0.6.4, which does not compile its
  158. C extensions by default, so there is no more need to faff around
  159. with NO_MELD3_EXTENSION_MODULES during installation if you don't
  160. have a C compiler or the Python development libraries on your
  161. system.
  162. - Instead of making a user root around for the sample.conf file,
  163. provide a convenience command "echo_supervisord_conf", which he can
  164. use to echo the sample.conf to his terminal (and redirect to a file
  165. appropriately). This is a new user convenience (especially one who
  166. has no Python experience).
  167. - Added 'numprocs_start' config option to '[program:x]' and
  168. '[eventlistener:x]' sections. This is an offset used to compute
  169. the first integer that 'numprocs' will begin to start from.
  170. Contributed by Antonio Beamud Montero.
  171. - Added capability for '[include]' config section to config format.
  172. This section must contain a single key "files", which must name a
  173. space-separated list of file globs that will be included in
  174. supervisor's configuration. Contributed by Ian Bicking.
  175. - Invoking the 'reload' supervisorctl command could trigger a bug in
  176. supervisord which caused it to crash. See
  177. http://www.plope.com/software/collector/253 . Thanks to William
  178. Dode for a bug report.
  179. - The 'pidproxy' script was made into a console script.
  180. - The 'password' value in both the '[inet_http_server]' and
  181. '[unix_http_server]' sections can now optionally be specified as a
  182. SHA hexdigest instead of as cleartext. Values prefixed with
  183. '{SHA}' will be considered SHA hex digests. To encrypt a password
  184. to a form suitable for pasting into the configuration file using
  185. Python, do, e.g.:
  186. >>> import sha
  187. >>> '{SHA}' + sha.new('thepassword').hexdigest()
  188. '{SHA}82ab876d1387bfafe46cc1c8a2ef074eae50cb1d'
  189. - The subtypes of the events PROCESS_STATE_CHANGE (and
  190. PROCESS_STATE_CHANGE itself) have been removed, replaced with a
  191. simpler set of PROCESS_STATE subscribable event types.
  192. The new event types are:
  193. PROCESS_STATE_STOPPED
  194. PROCESS_STATE_EXITED
  195. PROCESS_STATE_STARTING
  196. PROCESS_STATE_STOPPING
  197. PROCESS_STATE_BACKOFF
  198. PROCESS_STATE_FATAL
  199. PROCESS_STATE_RUNNING
  200. PROCESS_STATE_UNKNOWN
  201. PROCESS_STATE # abstract
  202. PROCESS_STATE_STARTING replaces:
  203. PROCESS_STATE_CHANGE_STARTING_FROM_STOPPED
  204. PROCESS_STATE_CHANGE_STARTING_FROM_BACKOFF
  205. PROCESS_STATE_CHANGE_STARTING_FROM_EXITED
  206. PROCESS_STATE_CHANGE_STARTING_FROM_FATAL
  207. PROCESS_STATE_RUNNING replaces
  208. PROCESS_STATE_CHANGE_RUNNING_FROM_STARTED
  209. PROCESS_STATE_BACKOFF replaces
  210. PROCESS_STATE_CHANGE_BACKOFF_FROM_STARTING
  211. PROCESS_STATE_STOPPING replaces:
  212. PROCESS_STATE_CHANGE_STOPPING_FROM_RUNNING
  213. PROCESS_STATE_CHANGE_STOPPING_FROM_STARTING
  214. PROCESS_STATE_EXITED replaces
  215. PROCESS_STATE_CHANGE_EXITED_FROM_RUNNING
  216. PROCESS_STATE_STOPPED replaces
  217. PROCESS_STATE_CHANGE_STOPPED_FROM_STOPPING
  218. PROCESS_STATE_FATAL replaces
  219. PROCESS_STATE_CHANGE_FATAL_FROM_BACKOFF
  220. PROCESS_STATE_UNKNOWN replaces PROCESS_STATE_CHANGE_TO_UNKNOWN
  221. PROCESS_STATE replaces PROCESS_STATE_CHANGE
  222. The PROCESS_STATE_CHANGE_EXITED_OR_STOPPED abstract event is gone.
  223. All process state changes have at least "processname",
  224. "groupname", and "from_state" (the name of the previous state) in
  225. their serializations.
  226. PROCESS_STATE_EXITED additionaly has "expected" (1 or 0) and "pid"
  227. (the process id) in its serialization.
  228. PROCESS_STATE_RUNNING, PROCESS_STATE_STOPPING,
  229. PROCESS_STATE_STOPPED additionally have "pid" in their
  230. serializations.
  231. PROCESS_STATE_STARTING and PROCESS_STATE_BACKOFF have "tries" in
  232. their serialization (initially "0", bumped +1 each time a start
  233. retry happens).
  234. - Remove documentation from README.txt, point people to
  235. http://supervisord.org/manual/ .
  236. - The eventlistener request/response protocol has changed. OK/FAIL
  237. must now be wrapped in a RESULT envelope so we can use it for more
  238. specialized communications.
  239. Previously, to signify success, an event listener would write the
  240. string 'OK\n' to its stdout. To signify that the event was seen
  241. but couldn't be handled by the listener and should be rebuffered,
  242. an event listener would write the string 'FAIL\n' to its stdout.
  243. In the new protocol, the listener must write the string:
  244. RESULT {resultlen}\n{result}
  245. For example, to signify OK:
  246. RESULT 2\nOK
  247. To signify FAIL:
  248. RESULT 4\nFAIL
  249. See the scripts/sample_eventlistener.py script for an example.
  250. - To provide a hook point for custom results returned from event
  251. handlers (see above) the [eventlistener:x] configuration sections
  252. now accept a "result_handler=" parameter,
  253. e.g. "result_handler=supervisor.dispatchers:default_handler" (the
  254. default) or "handler=mypackage:myhandler". The keys are pkgutil
  255. "entry point" specifications (importable Python function names).
  256. Result handlers must be callables which accept two arguments: one
  257. named "event" which represents the event, and the other named
  258. "result", which represents the listener's result. A result
  259. handler either executes successfully or raises an exception. If
  260. it raises a supervisor.dispatchers.RejectEvent exception, the
  261. event will be rebuffered, and the eventhandler will be placed back
  262. into the ACKNOWLEDGED state. If it raises any other exception,
  263. the event handler will be placed in the UNKNOWN state. If it does
  264. not raise any exception, the event is considered successfully
  265. processed. A result handler's return value is ignored. Writing a
  266. result handler is a "in case of emergency break glass" sort of
  267. thing, it is not something to be used for arbitrary business code.
  268. In particular, handlers *must not block* for any appreciable
  269. amount of time.
  270. The 'standard' eventlistener result handler
  271. (supervisor.dispatchers:default_handler) does nothing if it
  272. receives an "OK" and will raise a
  273. supervisor.dispatchers.RejectEvent exception if it receives any
  274. other value.
  275. - Supervisord now emits TICK events, which happen every N seconds.
  276. Three types of TICK events are available: TICK_5 (every five
  277. seconds), TICK_60 (every minute), TICK_3600 (every hour). Event
  278. listeners may subscribe to one of these types of events to perform
  279. every-so-often processing. TICK events are subtypes of the EVENT
  280. type.
  281. - Get rid of OSX platform-specific memory monitor and replace with
  282. memmon.py, which works on both Linux and Mac OS. This script is
  283. now a console script named "memmon".
  284. - Allow "web handler" (the handler which receives http requests from
  285. browsers visiting the web UI of supervisor) to deal with POST requests.
  286. - RPC interface methods stopProcess(), stopProcessGroup(), and
  287. stopAllProcesses() now take an optional "wait" argument that defaults
  288. to True for parity with the start methods.
  289. 3.0a3
  290. - Supervisorctl now reports a better error message when the main
  291. supervisor XML-RPC namespace is not registered. Thanks to
  292. Mike Orr for reporting this. (Mike Naberezny)
  293. - Create 'scripts' directory within supervisor package, move
  294. 'pidproxy.py' there, and place sample event listener and comm
  295. event programs within the directory.
  296. - When an event notification is buffered (either because a listener
  297. rejected it or because all listeners were busy when we attempted
  298. to send it originally), we now rebuffer it in a way that will
  299. result in it being retried earlier than it used to be.
  300. - When a listener process exits (unexpectedly) before transitioning
  301. from the BUSY state, rebuffer the event that was being processed.
  302. - supervisorctl 'tail' command now accepts a trailing specifier:
  303. 'stderr' or 'stdout', which respectively, allow a user to tail the
  304. stderr or stdout of the named process. When this specifier is not
  305. provided, tail defaults to stdout.
  306. - supervisor 'clear' command now clears both stderr and stdout logs
  307. for the given process.
  308. - When a process encounters a spawn error as a result of a failed
  309. execve or when it cannot setuid to a given uid, it now puts this
  310. info into the process' stderr log rather than its stdout log.
  311. - The event listener protocol header now contains the 'server'
  312. identifier, the 'pool' that the event emanated from, and the
  313. 'poolserial' as well as the values it previously contained
  314. (version, event name, serial, and length). The server identifier
  315. is taken from the config file options value 'identifier', the
  316. 'pool' value is the name of the listener pool that this event
  317. emanates from, and the 'poolserial' is a serial number assigned to
  318. the event local to the pool that is processing it.
  319. - The event listener protocol header is now a sequence of key-value
  320. pairs rather than a list of positional values. Previously, a
  321. representative header looked like:
  322. SUPERVISOR3.0 PROCESS_COMMUNICATION_STDOUT 30 22\n
  323. Now it looks like:
  324. ver:3.0 server:supervisor serial:21 ...
  325. - Specific event payload serializations have changed. All event
  326. types that deal with processes now include the pid of the process
  327. that the event is describing. In event serialization "header"
  328. values, we've removed the space between the header name and the
  329. value and headers are now separated by a space instead of a line
  330. feed. The names of keys in all event types have had underscores
  331. removed.
  332. - Abandon the use of the Python stdlib 'logging' module for speed
  333. and cleanliness purposes. We've rolled our own.
  334. - Fix crash on start if AUTO logging is used with a max_bytes of
  335. zero for a process.
  336. - Improve process communication event performance.
  337. - The process config parameters 'stdout_capturefile' and
  338. 'stderr_capturefile' are no longer valid. They have been replaced
  339. with the 'stdout_capture_maxbytes' and 'stderr_capture_maxbytes'
  340. parameters, which are meant to be suffix-multiplied integers.
  341. They both default to zero. When they are zero, process
  342. communication event capturing is not performed. When either is
  343. nonzero, the value represents the maximum number of bytes that
  344. will be captured between process event start and end tags. This
  345. change was to support the fact that we no longer keep capture data
  346. in a separate file, we just use a FIFO in RAM to maintain capture
  347. info. For users whom don't care about process communication
  348. events, or whom haven't changed the defaults for
  349. 'stdout_capturefile' or 'stderr_capturefile', they needn't do
  350. anything to their configurations to deal with this change.
  351. - Log message levels have been normalized. In particular, process
  352. stdin/stdout is now logged at 'debug' level rather than at 'trace'
  353. level ('trace' level is now reserved for output useful typically
  354. for debugging supervisor itself). See 'Supervisor Log Levels' in
  355. README.txt for more info.
  356. - When an event is rebuffered (because all listeners are busy or a
  357. listener rejected the event), the rebuffered event is now inserted
  358. in the head of the listener event queue. This doesn't guarantee
  359. event emission in natural ordering, because if a listener rejects
  360. an event or dies while it's processing an event, it can take an
  361. arbitrary amount of time for the event to be rebuffered, and other
  362. events may be processed in the meantime. But if pool listeners
  363. never reject an event or don't die while processing an event, this
  364. guarantees that events will be emitted in the order that they were
  365. received because if all listeners are busy, the rebuffered event
  366. will be tried again "first" on the next go-around.
  367. - Removed EVENT_BUFFER_OVERFLOW event type.
  368. - The supervisorctl xmlrpc proxy can now communicate with
  369. supervisord using a persistent HTTP connection.
  370. - A new module "supervisor.childutils" was added. This module
  371. provides utilities for Python scripts which act as children of
  372. supervisord. Most notably, it contains an API method
  373. "getRPCInterface" allows you to obtain an xmlrpxlib ServerProxy
  374. that is willing to communicate with the parent supervisor. It
  375. also contains utility functions that allow for parsing of
  376. supervisor event listener protocol headers. A pair of scripts
  377. (loop_eventgen.py and loop_listener.py) were added to the script
  378. directory that serve as examples about how to use the childutils
  379. module.
  380. - A new envvar is added to child process environments:
  381. SUPERVISOR_SERVER_URL. This contains the server URL for the
  382. supervisord running the child.
  383. - An 'OK' URL was added at /ok.html which just returns the string
  384. 'OK' (can be used for up checks or speed checks via
  385. plain-old-HTTP).
  386. - An additional command-line option '--profile_options' is accepted
  387. by the supervisord script for developer use.
  388. supervisord -n -c sample.conf --profile_options=cumulative,calls
  389. The values are sort_stats options that can be passed to the
  390. standard Python profiler's PStats sort_stats method.
  391. When you exit supervisor, it will print Python profiling output to
  392. stdout.
  393. - If cElementTree is installed in the Python used to invoke
  394. supervisor, an alternate (faster, by about 2X) XML parser will be
  395. used to parse XML-RPC request bodies. cElementTree was added as
  396. an "extras_require" option in setup.py.
  397. - Added the ability to start, stop, and restart process groups to
  398. supervisorctl. To start a group, use "start groupname:*". To
  399. start multiple groups, use "start groupname1:* groupname2:*".
  400. Equivalent commands work for "stop" and "restart". You can mix and
  401. match short processnames, fullly-specified group:process names,
  402. and groupsplats on the same line for any of these commands.
  403. - Added 'directory' option to process config. If you set this
  404. option, supervisor will chdir to this directory before executing
  405. the child program (and thus it will be the child's cwd).
  406. - Added 'umask' option to process config. If you set this option,
  407. supervisor will set the umask of the child program. (Thanks to
  408. Ian Bicking for the suggestion).
  409. - A pair of scripts "osx_memmon_eventgen.py" and
  410. "osx_memmon_listener.py" have been added to the scripts directory.
  411. If they are used together as described in their comments,
  412. processes which are consuming "too much" memory will be restarted.
  413. The 'eventgen' script only works on OSX (my main development
  414. platform) but it should be trivially generalizable to other
  415. operating systems.
  416. - The long form "--configuration" (-c) command line option for
  417. supervisord was broken. Reported by Mike Orr. (Mike Naberezny)
  418. - New log level: BLAT (blather). We log all
  419. supervisor-internal-related debugging info here. Thanks to Mike
  420. Orr for the suggestion.
  421. - We now allow supervisor to listen on both a UNIX domain socket and
  422. an inet socket instead of making them mutually exclusive. As a
  423. result, the options "http_port", "http_username", "http_password",
  424. "sockchmod" and "sockchown" are no longer part of the
  425. '[supervisord]' section configuration. These have been supplanted
  426. by two other sections: '[unix_http_server]' and
  427. '[inet_http_server']. You'll need to insert one or the other
  428. (depending on whether you want to listen on a UNIX domain socket
  429. or a TCP socket respectively) or both into your supervisord.conf
  430. file. These sections have their own options (where applicable)
  431. for port, username, password, chmod, and chown. See README.txt
  432. for more information about these sections.
  433. - All supervisord command-line options related to "http_port",
  434. "http_username", "http_password", "sockchmod" and "sockchown" have
  435. been removed (see above point for rationale).
  436. - The option that *used* to be 'sockchown' within the
  437. '[supervisord]' section (and is now named 'chown' within the
  438. '[unix_http_server]' section) used to accept a dot-separated
  439. user.group value. The separator now must be a colon ":",
  440. e.g. "user:group". Unices allow for dots in usernames, so this
  441. change is a bugfix. Thanks to Ian Bicking for the bug report.
  442. - If a '-c' option is not specified on the command line, both
  443. supervisord and supervisorctl will search for one in the paths
  444. './supervisord.conf' , './etc/supervisord.conf' (relative to the
  445. current working dir when supervisord or supervisorctl is invoked)
  446. or in '/etc/supervisord.conf' (the old default path). These paths
  447. are searched in order, and supervisord and supervisorctl will use
  448. the first one found. If none are found, supervisor will fail to
  449. start.
  450. - The Python string expression '%(here)s' (referring to the
  451. directory in which the the configuration file was found) can be
  452. used within the following sections/options within the config file:
  453. unix_http_server:file
  454. supervisor:directory
  455. supervisor:logfile
  456. supervisor:pidfile
  457. supervisor:childlogdir
  458. supervisor:environment
  459. program:environment
  460. program:stdout_logfile
  461. program:stderr_logfile
  462. program:process_name
  463. program:command
  464. - The '--environment' aka '-b' option was removed from the list of
  465. available command-line switches to supervisord (use "A=1 B=2
  466. bin/supervisord" instead).
  467. - If the socket filename (the tail-end of the unix:// URL) was
  468. longer than 64 characters, supervisorctl would fail with an
  469. encoding error at startup.
  470. - The 'identifier' command-line argument was not functional.
  471. - Fixed http://www.plope.com/software/collector/215 (bad error
  472. message in supervisorctl when program command not found on PATH).
  473. - Some child processes may not have been shut down properly at
  474. supervisor shutdown time.
  475. - Move to ZPL-derived (but not ZPL) license availble from
  476. http://www.repoze.org/LICENSE.txt; it's slightly less restrictive
  477. than the ZPL (no servicemark clause).
  478. - Spurious errors related to unclosed files ("bad file descriptor",
  479. typically) were evident at supervisord "reload" time (when using
  480. the "reload" command from supervisorctl).
  481. - Updated ez_setup.py to one that knows about setuptools 0.6c7.
  482. 3.0a2
  483. - Fixed the README.txt example for defining the supervisor RPC
  484. interface in the configuration file. Thanks to Drew Perttula.
  485. - Fixed a bug where process communication events would not have the
  486. proper payload if the payload data was very short.
  487. - when supervisord attempted to kill a process with SIGKILL after
  488. the process was not killed within "stopwaitsecs" using a "normal"
  489. kill signal, supervisord would crash with an improper
  490. AssertionError. Thanks to Calvin Hendryx-Parker.
  491. - On Linux, Supervisor would consume too much CPU in an effective
  492. "busywait" between the time a subprocess exited and the time at
  493. which supervisor was notified of its exit status. Thanks to Drew
  494. Perttula.
  495. - RPC interface behavior change: if the RPC method
  496. "sendProcessStdin" is called against a process that has closed its
  497. stdin file descriptor (e.g. it has done the equivalent of
  498. "sys.stdin.close(); os.close(0)"), we return a NO_FILE fault
  499. instead of accepting the data.
  500. - Changed the semantics of the process configuration 'autorestart'
  501. parameter with respect to processes which move between the RUNNING
  502. and EXITED state. 'autorestart' was previously a boolean. Now
  503. it's a trinary, accepting one of 'false', 'unexpected', or 'true'.
  504. If it's 'false', a process will never be automatically restarted
  505. from the EXITED state. If it's 'unexpected', a process that
  506. enters the EXITED state will be automatically restarted if it
  507. exited with an exit code that was not named in the process
  508. config's 'exitcodes' list. If it's 'true', a process that enters
  509. the EXITED state will be automatically restarted unconditionally.
  510. The default is now 'unexpected' (it was previously 'true'). The
  511. readdition of this feature is a reversion of the behavior change
  512. note in the changelog notes for 3.0a1 that asserted we never cared
  513. about the process' exit status when determining whether to restart
  514. it or not.
  515. - setup.py develop (and presumably setup.py install) would fail
  516. under Python 2.3.3, because setuptools attempted to import
  517. 'splituser' from urllib2, and it didn't exist.
  518. - It's now possible to use 'setup.py install' and 'setup.py develop'
  519. on systems which do not have a C compiler if you set the
  520. environment variable "NO_MELD3_EXTENSION_MODULES=1" in the shell
  521. in which you invoke these commands (versions of meld3 > 0.6.1
  522. respect this envvar and do not try to compile optional C
  523. extensions when it's set).
  524. - The test suite would fail on Python versions <= 2.3.3 because
  525. the "assertTrue" and "assertFalse" methods of unittest.TestCase
  526. didn't exist in those versions.
  527. - The 'supervisorctl' and 'supervisord' wrapper scripts were disused
  528. in favor of using setuptools' 'console_scripts' entry point settings.
  529. - Documentation files and the sample configuration file are put into
  530. the generated supervisor egg's 'doc' directory.
  531. _ Using the web interface would cause fairly dramatic memory
  532. leakage. We now require a version of meld3 that does not appear
  533. to leak memory from its C extensions (0.6.3).
  534. 3.0a1
  535. - Default config file comment documented 10 secs as default for
  536. 'startsecs' value in process config, in reality it was 1 sec.
  537. Thanks to Christoph Zwerschke.
  538. - Make note of subprocess environment behavior in README.txt.
  539. Thanks to Christoph Zwerschke.
  540. - New "strip_ansi" config file option attempts to strip ANSI escape
  541. sequences from logs for smaller/more readable logs (submitted by
  542. Mike Naberezny).
  543. - The XML-RPC method supervisor.getVersion() has been renamed for
  544. clarity to supervisor.getAPIVersion(). The old name is aliased
  545. for compatibility but is deprecated and will be removed in a
  546. future version (Mike Naberezny).
  547. - Improved web interface styling (Mike Naberezny, Derek DeVries)
  548. - The XML-RPC method supervisor.startProcess() now checks that
  549. the file exists and is executable (Mike Naberezny).
  550. - Two environment variables, "SUPERVISOR_PROCESS_NAME" and
  551. "SUPERVISOR_PROCESS_GROUP" are set in the environment of child
  552. processes, representing the name of the process and group in
  553. supervisor's configuration.
  554. - Process state map change: a process may now move directly from the
  555. STARTING state to the STOPPING state (as a result of a stop
  556. request).
  557. - Behavior change: if 'autorestart' is true, even if a process exits
  558. with an "expected" exit code, it will still be restarted. In the
  559. immediately prior release of supervisor, this was true anyway, and
  560. no one complained, so we're going to consider that the "officially
  561. correct" behavior from now on.
  562. - Supervisor now logs subprocess stdout and stderr independently.
  563. The old program config keys "logfile", "logfile_backups" and
  564. "logfile_maxbytes" are superseded by "stdout_logfile",
  565. "stdout_logfile_backups", and "stdout_logfile_maxbytes". Added
  566. keys include "stderr_logfile", "stderr_logfile_backups", and
  567. "stderr_logfile_maxbytes". An additional "redirect_stderr" key is
  568. used to cause program stderr output to be sent to its stdin
  569. channel. The keys "log_stderr" and "log_stdout" have been
  570. removed.
  571. - '[program:x]' config file sections now represent "homgeneous
  572. process groups" instead of single processes. A "numprocs" key in
  573. the section represents the number of processes that are in the
  574. group. A "process_name" key in the section allows composition of
  575. the each process' name within the homogeneous group.
  576. - A new kind of config file section, '[group:x]' now exists,
  577. allowing users to group heterogeneous processes together into a
  578. process group that can be controlled as a unit from a client.
  579. - Supervisord now emits "events" at certain points in its normal
  580. operation. These events include supervisor state change events,
  581. process state change events, and "process communication events".
  582. - A new kind of config file section '[eventlistener:x]' now exists.
  583. Each section represents an "event listener pool", which is a
  584. special kind of homogeneous process group. Each process in the
  585. pool is meant to receive supervisor "events" via its stdin and
  586. perform some notification (e.g. send a mail, log, make an http
  587. request, etc.)
  588. - Supervisord can now capture data between special tokens in
  589. subprocess stdout/stderr output and emit a "process communications
  590. event" as a result.
  591. - Supervisor's XML-RPC interface may be extended arbitrarily by
  592. programmers. Additional top-level namespace XML-RPC interfaces
  593. can be added using the '[rpcinterface:foo]' declaration in the
  594. configuration file.
  595. - New 'supervisor'-namespace XML-RPC methods have been added:
  596. getAPIVersion (returns the XML-RPC API version, the older
  597. "getVersion" is now deprecated), "startProcessGroup" (starts all
  598. processes in a supervisor process group), "stopProcessGroup"
  599. (stops all processes in a supervisor process group), and
  600. "sendProcessStdin" (sends data to a process' stdin file
  601. descriptor).
  602. - 'supervisor'-namespace XML-RPC methods which previously accepted
  603. ony a process name as "name" (startProcess, stopProcess,
  604. getProcessInfo, readProcessLog, tailProcessLog, and
  605. clearProcessLog) now accept a "name" which may contain both the
  606. process name and the process group name in the form
  607. 'groupname:procname'. For backwards compatibility purposes,
  608. "simple" names will also be accepted but will be expanded
  609. internally (e.g. if "foo" is sent as a name, it will be expanded
  610. to "foo:foo", representing the foo process within the foo process
  611. group).
  612. - 2.X versions of supervisorctl will work against supervisor 3.0
  613. servers in a degraded fashion, but 3.X versions of supervisorctl
  614. will not work at all against supervisor 2.X servers.
  615. Known issues:
  616. - supervisorctl and the web interface do not yet allow you to stop
  617. / start / restart a process group as a unit.
  618. - supervisorctl and the web interface do not allow you to tail or
  619. otherwise examine stderr log files of processes.
  620. - buffered event notifications may be lost at supervisor shutdown
  621. or restart time.
  622. Acknowledgements:
  623. Maintainable Software (http://www.maintainable.com) contracted
  624. Agendless Consulting to add the event notification features and
  625. extensible XML-RPC namespaces feature to supervisor.
  626. 2.2b1
  627. - Individual program configuration sections can now specify an
  628. environment.
  629. - Added a 'version' command to supervisorctl. This returns the
  630. version of the supervisor2 package which the remote supervisord
  631. process is using.
  632. 2.1
  633. - When supervisord was invoked more than once, and its configuration
  634. was set up to use a UNIX domain socket as the HTTP server, the
  635. socket file would be erased in error. The symptom of this was
  636. that a subsequent invocation of supervisorctl could not find the
  637. socket file, so the process could not be controlled (it and all of
  638. its subprocesses would need to be killed by hand).
  639. - Close subprocess file descriptors properly when a subprocess exits
  640. or otherwise dies. This should result in fewer "too many open
  641. files to spawn foo" messages when supervisor is left up for long
  642. periods of time.
  643. - When a process was not killable with a "normal" signal at shutdown
  644. time, too many "INFO: waiting for x to die" messages would be sent
  645. to the log until we ended up killing the process with a SIGKILL.
  646. Now a maximum of one every three seconds is sent up until SIGKILL
  647. time. Thanks to Ian Bicking.
  648. - Add an assertion: we never want to try to marshal None to XML-RPC
  649. callers. Issue 223 in the collector from vgatto indicates that
  650. somehow a supervisor XML-RPC method is returning None (which
  651. should never happen), but I cannot identify how. Maybe the
  652. assertion will give us more clues if it happens again.
  653. - Supervisor would crash when run under Python 2.5 because the
  654. xmlrpclib.Transport class in Python 2.5 changed in a
  655. backward-incompatible way. Thanks to Eric Westra for the bug
  656. report and a fix.
  657. - Tests now pass under Python 2.5.
  658. - Better supervisorctl reporting on stop requests that have a FAILED
  659. status.
  660. - Removed duplicated code (readLog/readMainLog), thanks to Mike
  661. Naberezny.
  662. - Added tailProcessLog command to the XML-RPC API. It provides a
  663. more efficient way to tail logs than readProcessLog(). Use
  664. readProcessLog() to read chunks and tailProcessLog() to tail.
  665. (thanks to Mike Naberezny).
  666. 2.1b2
  667. - Added new tailProcessLog() command to the XML-RPC API that
  668. is more efficient for just tailing than the existing
  669. readProcessLog() command (Mike Naberezny).
  670. 2.1b1
  671. - "supervisord -h" and "supervisorctl -h" did not work (traceback
  672. instead of showing help view (thanks to Damjan from Macedonia for
  673. the bug report).
  674. - Processes which started successfully after failing to start
  675. initially are no longer reported in BACKOFF state once they are
  676. started successfully (thanks to Damjan from Macdonia for the bug
  677. report).
  678. - Add new 'maintail' command to supervisorctl shell, which allows
  679. you to tail the 'main' supervisor log. This uses a new
  680. readMainLog xmlrpc API.
  681. - Various process-state-transition related changes, all internal.
  682. README.txt updated with new state transition map.
  683. - startProcess and startAllProcesses xmlrpc APIs changed: instead of
  684. accepting a timeout integer, these accept a wait boolean (timeout
  685. is implied by process' "startsecs" configuration). If wait is
  686. False, do not wait for startsecs.
  687. Known issues:
  688. Code does not match state transition map. Processes which are
  689. configured as autorestarting which start "successfully" but
  690. subsequently die after 'startsecs' go through the transitions
  691. RUNNING -> BACKOFF -> STARTING instead of the correct transitions
  692. RUNNING -> EXITED -> STARTING. This has no real negative effect,
  693. but should be fixed for correctness.
  694. 2.0
  695. - pidfile written in daemon mode had incorrect pid.
  696. - supervisorctl: tail (non -f) did not pass through proper error
  697. messages when supplied by the server.
  698. - Log signal name used to kill processes at debug level.
  699. - supervisorctl "tail -f" didn't work with supervisorctl sections
  700. configured with an absolute unix:// URL
  701. - New "environment" config file option allows you to add environment
  702. variable values to supervisord environment from config file.
  703. 2.0b1
  704. - fundamental rewrite based on 1.0.6, use distutils (only) for
  705. installation, use ConfigParser rather than ZConfig, use HTTP for
  706. wire protocol, web interface, less lies in supervisorctl.