CHANGES.txt 45 KB

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