CHANGES.txt 42 KB

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