CHANGES.txt 43 KB

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