CHANGES.txt 43 KB

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