CHANGES.txt 44 KB

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