CHANGES.txt 43 KB

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