CHANGES.txt 44 KB

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