CHANGES.txt 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. Next Release
  2. - 3.0a3 broke Python 2.3 backwards compatibility.
  3. - On Debian Sarge, one user reported that a call to
  4. options.mktempfile would fail with an "[Errno 9] Bad file
  5. descriptor" at supervisord startup time. I was unable to
  6. reproduce this, but we found a workaround that seemed to work for
  7. him and it's included in this release. See
  8. http://www.plope.com/software/collector/252 for more information.
  9. Thanks to William Dode.
  10. - The fault ALREADY_TERMINATED has been removed. It was only
  11. raised by supervisor.sendProcessStdin(). That method now returns
  12. NOT_RUNNING for parity with the other methods. (Mike Naberezny)
  13. - The fault TIMED_OUT has been removed. It was not used.
  14. 3.0a3
  15. - Supervisorctl now reports a better error message when the main
  16. supervisor XML-RPC namespace is not registered. Thanks to
  17. Mike Orr for reporting this. (Mike Naberezny)
  18. - Create 'scripts' directory within supervisor package, move
  19. 'pidproxy.py' there, and place sample event listener and comm
  20. event programs within the directory.
  21. - When an event notification is buffered (either because a listener
  22. rejected it or because all listeners were busy when we attempted
  23. to send it originally), we now rebuffer it in a way that will
  24. result in it being retried earlier than it used to be.
  25. - When a listener process exits (unexpectedly) before transitioning
  26. from the BUSY state, rebuffer the event that was being processed.
  27. - supervisorctl 'tail' command now accepts a trailing specifier:
  28. 'stderr' or 'stdout', which respectively, allow a user to tail the
  29. stderr or stdout of the named process. When this specifier is not
  30. provided, tail defaults to stdout.
  31. - supervisor 'clear' command now clears both stderr and stdout logs
  32. for the given process.
  33. - When a process encounters a spawn error as a result of a failed
  34. execve or when it cannot setuid to a given uid, it now puts this
  35. info into the process' stderr log rather than its stdout log.
  36. - The event listener protocol header now contains the 'server'
  37. identifier, the 'pool' that the event emanated from, and the
  38. 'poolserial' as well as the values it previously contained
  39. (version, event name, serial, and length). The server identifier
  40. is taken from the config file options value 'identifier', the
  41. 'pool' value is the name of the listener pool that this event
  42. emanates from, and the 'poolserial' is a serial number assigned to
  43. the event local to the pool that is processing it.
  44. - The event listener protocol header is now a sequence of key-value
  45. pairs rather than a list of positional values. Previously, a
  46. representative header looked like:
  47. SUPERVISOR3.0 PROCESS_COMMUNICATION_STDOUT 30 22\n
  48. Now it looks like:
  49. ver:3.0 server:supervisor serial:21 ...
  50. - Specific event payload serializations have changed. All event
  51. types that deal with processes now include the pid of the process
  52. that the event is describing. In event serialization "header"
  53. values, we've removed the space between the header name and the
  54. value and headers are now separated by a space instead of a line
  55. feed. The names of keys in all event types have had underscores
  56. removed.
  57. - Abandon the use of the Python stdlib 'logging' module for speed
  58. and cleanliness purposes. We've rolled our own.
  59. - Fix crash on start if AUTO logging is used with a max_bytes of
  60. zero for a process.
  61. - Improve process communication event performance.
  62. - The process config parameters 'stdout_capturefile' and
  63. 'stderr_capturefile' are no longer valid. They have been replaced
  64. with the 'stdout_capture_maxbytes' and 'stderr_capture_maxbytes'
  65. parameters, which are meant to be suffix-multiplied integers.
  66. They both default to zero. When they are zero, process
  67. communication event capturing is not performed. When either is
  68. nonzero, the value represents the maximum number of bytes that
  69. will be captured between process event start and end tags. This
  70. change was to support the fact that we no longer keep capture data
  71. in a separate file, we just use a FIFO in RAM to maintain capture
  72. info. For users whom don't care about process communication
  73. events, or whom haven't changed the defaults for
  74. 'stdout_capturefile' or 'stderr_capturefile', they needn't do
  75. anything to their configurations to deal with this change.
  76. - Log message levels have been normalized. In particular, process
  77. stdin/stdout is now logged at 'debug' level rather than at 'trace'
  78. level ('trace' level is now reserved for output useful typically
  79. for debugging supervisor itself). See 'Supervisor Log Levels' in
  80. README.txt for more info.
  81. - When an event is rebuffered (because all listeners are busy or a
  82. listener rejected the event), the rebuffered event is now inserted
  83. in the head of the listener event queue. This doesn't guarantee
  84. event emission in natural ordering, because if a listener rejects
  85. an event or dies while it's processing an event, it can take an
  86. arbitrary amount of time for the event to be rebuffered, and other
  87. events may be processed in the meantime. But if pool listeners
  88. never reject an event or don't die while processing an event, this
  89. guarantees that events will be emitted in the order that they were
  90. received because if all listeners are busy, the rebuffered event
  91. will be tried again "first" on the next go-around.
  92. - Removed EVENT_BUFFER_OVERFLOW event type.
  93. - The supervisorctl xmlrpc proxy can now communicate with
  94. supervisord using a persistent HTTP connection.
  95. - A new module "supervisor.childutils" was added. This module
  96. provides utilities for Python scripts which act as children of
  97. supervisord. Most notably, it contains an API method
  98. "getRPCInterface" allows you to obtain an xmlrpxlib ServerProxy
  99. that is willing to communicate with the parent supervisor. It
  100. also contains utility functions that allow for parsing of
  101. supervisor event listener protocol headers. A pair of scripts
  102. (loop_eventgen.py and loop_listener.py) were added to the script
  103. directory that serve as examples about how to use the childutils
  104. module.
  105. - A new envvar is added to child process environments:
  106. SUPERVISOR_SERVER_URL. This contains the server URL for the
  107. supervisord running the child.
  108. - An 'OK' URL was added at /ok.html which just returns the string
  109. 'OK' (can be used for up checks or speed checks via
  110. plain-old-HTTP).
  111. - An additional command-line option '--profile_options' is accepted
  112. by the supervisord script for developer use.
  113. supervisord -n -c sample.conf --profile_options=cumulative,calls
  114. The values are sort_stats options that can be passed to the
  115. standard Python profiler's PStats sort_stats method.
  116. When you exit supervisor, it will print Python profiling output to
  117. stdout.
  118. - If cElementTree is installed in the Python used to invoke
  119. supervisor, an alternate (faster, by about 2X) XML parser will be
  120. used to parse XML-RPC request bodies. cElementTree was added as
  121. an "extras_require" option in setup.py.
  122. - Added the ability to start, stop, and restart process groups to
  123. supervisorctl. To start a group, use "start groupname:*". To
  124. start multiple groups, use "start groupname1:* groupname2:*".
  125. Equivalent commands work for "stop" and "restart". You can mix and
  126. match short processnames, fullly-specified group:process names,
  127. and groupsplats on the same line for any of these commands.
  128. - Added 'directory' option to process config. If you set this
  129. option, supervisor will chdir to this directory before executing
  130. the child program (and thus it will be the child's cwd).
  131. - Added 'umask' option to process config. If you set this option,
  132. supervisor will set the umask of the child program. (Thanks to
  133. Ian Bicking for the suggestion).
  134. - A pair of scripts "osx_memmon_eventgen.py" and
  135. "osx_memmon_listener.py" have been added to the scripts directory.
  136. If they are used together as described in their comments,
  137. processes which are consuming "too much" memory will be restarted.
  138. The 'eventgen' script only works on OSX (my main development
  139. platform) but it should be trivially generalizable to other
  140. operating systems.
  141. - The long form "--configuration" (-c) command line option for
  142. supervisord was broken. Reported by Mike Orr. (Mike Naberezny)
  143. - New log level: BLAT (blather). We log all
  144. supervisor-internal-related debugging info here. Thanks to Mike
  145. Orr for the suggestion.
  146. - We now allow supervisor to listen on both a UNIX domain socket and
  147. an inet socket instead of making them mutually exclusive. As a
  148. result, the options "http_port", "http_username", "http_password",
  149. "sockchmod" and "sockchown" are no longer part of the
  150. '[supervisord]' section configuration. These have been supplanted
  151. by two other sections: '[unix_http_server]' and
  152. '[inet_http_server']. You'll need to insert one or the other
  153. (depending on whether you want to listen on a UNIX domain socket
  154. or a TCP socket respectively) or both into your supervisord.conf
  155. file. These sections have their own options (where applicable)
  156. for port, username, password, chmod, and chown. See README.txt
  157. for more information about these sections.
  158. - All supervisord command-line options related to "http_port",
  159. "http_username", "http_password", "sockchmod" and "sockchown" have
  160. been removed (see above point for rationale).
  161. - The option that *used* to be 'sockchown' within the
  162. '[supervisord]' section (and is now named 'chown' within the
  163. '[unix_http_server]' section) used to accept a dot-separated
  164. user.group value. The separator now must be a colon ":",
  165. e.g. "user:group". Unices allow for dots in usernames, so this
  166. change is a bugfix. Thanks to Ian Bicking for the bug report.
  167. - If a '-c' option is not specified on the command line, both
  168. supervisord and supervisorctl will search for one in the paths
  169. './supervisord.conf' , './etc/supervisord.conf' (relative to the
  170. current working dir when supervisord or supervisorctl is invoked)
  171. or in '/etc/supervisord.conf' (the old default path). These paths
  172. are searched in order, and supervisord and supervisorctl will use
  173. the first one found. If none are found, supervisor will fail to
  174. start.
  175. - The Python string expression '%(here)s' (referring to the
  176. directory in which the the configuration file was found) can be
  177. used within the following sections/options within the config file:
  178. unix_http_server:file
  179. supervisor:directory
  180. supervisor:logfile
  181. supervisor:pidfile
  182. supervisor:childlogdir
  183. supervisor:environment
  184. program:environment
  185. program:stdout_logfile
  186. program:stderr_logfile
  187. program:process_name
  188. program:command
  189. - The '--environment' aka '-b' option was removed from the list of
  190. available command-line switches to supervisord (use "A=1 B=2
  191. bin/supervisord" instead).
  192. - If the socket filename (the tail-end of the unix:// URL) was
  193. longer than 64 characters, supervisorctl would fail with an
  194. encoding error at startup.
  195. - The 'identifier' command-line argument was not functional.
  196. - Fixed http://www.plope.com/software/collector/215 (bad error
  197. message in supervisorctl when program command not found on PATH).
  198. - Some child processes may not have been shut down properly at
  199. supervisor shutdown time.
  200. - Move to ZPL-derived (but not ZPL) license availble from
  201. http://www.repoze.org/LICENSE.txt; it's slightly less restrictive
  202. than the ZPL (no servicemark clause).
  203. - Spurious errors related to unclosed files ("bad file descriptor",
  204. typically) were evident at supervisord "reload" time (when using
  205. the "reload" command from supervisorctl).
  206. - Updated ez_setup.py to one that knows about setuptools 0.6c7.
  207. 3.0a2
  208. - Fixed the README.txt example for defining the supervisor RPC
  209. interface in the configuration file. Thanks to Drew Perttula.
  210. - Fixed a bug where process communication events would not have the
  211. proper payload if the payload data was very short.
  212. - when supervisord attempted to kill a process with SIGKILL after
  213. the process was not killed within "stopwaitsecs" using a "normal"
  214. kill signal, supervisord would crash with an improper
  215. AssertionError. Thanks to Calvin Hendryx-Parker.
  216. - On Linux, Supervisor would consume too much CPU in an effective
  217. "busywait" between the time a subprocess exited and the time at
  218. which supervisor was notified of its exit status. Thanks to Drew
  219. Perttula.
  220. - RPC interface behavior change: if the RPC method
  221. "sendProcessStdin" is called against a process that has closed its
  222. stdin file descriptor (e.g. it has done the equivalent of
  223. "sys.stdin.close(); os.close(0)"), we return a NO_FILE fault
  224. instead of accepting the data.
  225. - Changed the semantics of the process configuration 'autorestart'
  226. parameter with respect to processes which move between the RUNNING
  227. and EXITED state. 'autorestart' was previously a boolean. Now
  228. it's a trinary, accepting one of 'false', 'unexpected', or 'true'.
  229. If it's 'false', a process will never be automatically restarted
  230. from the EXITED state. If it's 'unexpected', a process that
  231. enters the EXITED state will be automatically restarted if it
  232. exited with an exit code that was not named in the process
  233. config's 'exitcodes' list. If it's 'true', a process that enters
  234. the EXITED state will be automatically restarted unconditionally.
  235. The default is now 'unexpected' (it was previously 'true'). The
  236. readdition of this feature is a reversion of the behavior change
  237. note in the changelog notes for 3.0a1 that asserted we never cared
  238. about the process' exit status when determining whether to restart
  239. it or not.
  240. - setup.py develop (and presumably setup.py install) would fail
  241. under Python 2.3.3, because setuptools attempted to import
  242. 'splituser' from urllib2, and it didn't exist.
  243. - It's now possible to use 'setup.py install' and 'setup.py develop'
  244. on systems which do not have a C compiler if you set the
  245. environment variable "NO_MELD3_EXTENSION_MODULES=1" in the shell
  246. in which you invoke these commands (versions of meld3 > 0.6.1
  247. respect this envvar and do not try to compile optional C
  248. extensions when it's set).
  249. - The test suite would fail on Python versions <= 2.3.3 because
  250. the "assertTrue" and "assertFalse" methods of unittest.TestCase
  251. didn't exist in those versions.
  252. - The 'supervisorctl' and 'supervisord' wrapper scripts were disused
  253. in favor of using setuptools' 'console_scripts' entry point settings.
  254. - Documentation files and the sample configuration file are put into
  255. the generated supervisor egg's 'doc' directory.
  256. _ Using the web interface would cause fairly dramatic memory
  257. leakage. We now require a version of meld3 that does not appear
  258. to leak memory from its C extensions (0.6.3).
  259. 3.0a1
  260. - Default config file comment documented 10 secs as default for
  261. 'startsecs' value in process config, in reality it was 1 sec.
  262. Thanks to Christoph Zwerschke.
  263. - Make note of subprocess environment behavior in README.txt.
  264. Thanks to Christoph Zwerschke.
  265. - New "strip_ansi" config file option attempts to strip ANSI escape
  266. sequences from logs for smaller/more readable logs (submitted by
  267. Mike Naberezny).
  268. - The XML-RPC method supervisor.getVersion() has been renamed for
  269. clarity to supervisor.getAPIVersion(). The old name is aliased
  270. for compatibility but is deprecated and will be removed in a
  271. future version (Mike Naberezny).
  272. - Improved web interface styling (Mike Naberezny, Derek DeVries)
  273. - The XML-RPC method supervisor.startProcess() now checks that
  274. the file exists and is executable (Mike Naberezny).
  275. - Two environment variables, "SUPERVISOR_PROCESS_NAME" and
  276. "SUPERVISOR_PROCESS_GROUP" are set in the environment of child
  277. processes, representing the name of the process and group in
  278. supervisor's configuration.
  279. - Process state map change: a process may now move directly from the
  280. STARTING state to the STOPPING state (as a result of a stop
  281. request).
  282. - Behavior change: if 'autorestart' is true, even if a process exits
  283. with an "expected" exit code, it will still be restarted. In the
  284. immediately prior release of supervisor, this was true anyway, and
  285. no one complained, so we're going to consider that the "officially
  286. correct" behavior from now on.
  287. - Supervisor now logs subprocess stdout and stderr independently.
  288. The old program config keys "logfile", "logfile_backups" and
  289. "logfile_maxbytes" are superseded by "stdout_logfile",
  290. "stdout_logfile_backups", and "stdout_logfile_maxbytes". Added
  291. keys include "stderr_logfile", "stderr_logfile_backups", and
  292. "stderr_logfile_maxbytes". An additional "redirect_stderr" key is
  293. used to cause program stderr output to be sent to its stdin
  294. channel. The keys "log_stderr" and "log_stdout" have been
  295. removed.
  296. - '[program:x]' config file sections now represent "homgeneous
  297. process groups" instead of single processes. A "numprocs" key in
  298. the section represents the number of processes that are in the
  299. group. A "process_name" key in the section allows composition of
  300. the each process' name within the homogeneous group.
  301. - A new kind of config file section, '[group:x]' now exists,
  302. allowing users to group heterogeneous processes together into a
  303. process group that can be controlled as a unit from a client.
  304. - Supervisord now emits "events" at certain points in its normal
  305. operation. These events include supervisor state change events,
  306. process state change events, and "process communication events".
  307. - A new kind of config file section '[eventlistener:x]' now exists.
  308. Each section represents an "event listener pool", which is a
  309. special kind of homogeneous process group. Each process in the
  310. pool is meant to receive supervisor "events" via its stdin and
  311. perform some notification (e.g. send a mail, log, make an http
  312. request, etc.)
  313. - Supervisord can now capture data between special tokens in
  314. subprocess stdout/stderr output and emit a "process communications
  315. event" as a result.
  316. - Supervisor's XML-RPC interface may be extended arbitrarily by
  317. programmers. Additional top-level namespace XML-RPC interfaces
  318. can be added using the '[rpcinterface:foo]' declaration in the
  319. configuration file.
  320. - New 'supervisor'-namespace XML-RPC methods have been added:
  321. getAPIVersion (returns the XML-RPC API version, the older
  322. "getVersion" is now deprecated), "startProcessGroup" (starts all
  323. processes in a supervisor process group), "stopProcessGroup"
  324. (stops all processes in a supervisor process group), and
  325. "sendProcessStdin" (sends data to a process' stdin file
  326. descriptor).
  327. - 'supervisor'-namespace XML-RPC methods which previously accepted
  328. ony a process name as "name" (startProcess, stopProcess,
  329. getProcessInfo, readProcessLog, tailProcessLog, and
  330. clearProcessLog) now accept a "name" which may contain both the
  331. process name and the process group name in the form
  332. 'groupname:procname'. For backwards compatibility purposes,
  333. "simple" names will also be accepted but will be expanded
  334. internally (e.g. if "foo" is sent as a name, it will be expanded
  335. to "foo:foo", representing the foo process within the foo process
  336. group).
  337. - 2.X versions of supervisorctl will work against supervisor 3.0
  338. servers in a degraded fashion, but 3.X versions of supervisorctl
  339. will not work at all against supervisor 2.X servers.
  340. Known issues:
  341. - supervisorctl and the web interface do not yet allow you to stop
  342. / start / restart a process group as a unit.
  343. - supervisorctl and the web interface do not allow you to tail or
  344. otherwise examine stderr log files of processes.
  345. - buffered event notifications may be lost at supervisor shutdown
  346. or restart time.
  347. Acknowledgements:
  348. Maintainable Software (http://www.maintainable.com) contracted
  349. Agendless Consulting to add the event notification features and
  350. extensible XML-RPC namespaces feature to supervisor.
  351. 2.2b1
  352. - Individual program configuration sections can now specify an
  353. environment.
  354. - Added a 'version' command to supervisorctl. This returns the
  355. version of the supervisor2 package which the remote supervisord
  356. process is using.
  357. 2.1
  358. - When supervisord was invoked more than once, and its configuration
  359. was set up to use a UNIX domain socket as the HTTP server, the
  360. socket file would be erased in error. The symptom of this was
  361. that a subsequent invocation of supervisorctl could not find the
  362. socket file, so the process could not be controlled (it and all of
  363. its subprocesses would need to be killed by hand).
  364. - Close subprocess file descriptors properly when a subprocess exits
  365. or otherwise dies. This should result in fewer "too many open
  366. files to spawn foo" messages when supervisor is left up for long
  367. periods of time.
  368. - When a process was not killable with a "normal" signal at shutdown
  369. time, too many "INFO: waiting for x to die" messages would be sent
  370. to the log until we ended up killing the process with a SIGKILL.
  371. Now a maximum of one every three seconds is sent up until SIGKILL
  372. time. Thanks to Ian Bicking.
  373. - Add an assertion: we never want to try to marshal None to XML-RPC
  374. callers. Issue 223 in the collector from vgatto indicates that
  375. somehow a supervisor XML-RPC method is returning None (which
  376. should never happen), but I cannot identify how. Maybe the
  377. assertion will give us more clues if it happens again.
  378. - Supervisor would crash when run under Python 2.5 because the
  379. xmlrpclib.Transport class in Python 2.5 changed in a
  380. backward-incompatible way. Thanks to Eric Westra for the bug
  381. report and a fix.
  382. - Tests now pass under Python 2.5.
  383. - Better supervisorctl reporting on stop requests that have a FAILED
  384. status.
  385. - Removed duplicated code (readLog/readMainLog), thanks to Mike
  386. Naberezny.
  387. - Added tailProcessLog command to the XML-RPC API. It provides a
  388. more efficient way to tail logs than readProcessLog(). Use
  389. readProcessLog() to read chunks and tailProcessLog() to tail.
  390. (thanks to Mike Naberezny).
  391. 2.1b2
  392. - Added new tailProcessLog() command to the XML-RPC API that
  393. is more efficient for just tailing than the existing
  394. readProcessLog() command (Mike Naberezny).
  395. 2.1b1
  396. - "supervisord -h" and "supervisorctl -h" did not work (traceback
  397. instead of showing help view (thanks to Damjan from Macedonia for
  398. the bug report).
  399. - Processes which started successfully after failing to start
  400. initially are no longer reported in BACKOFF state once they are
  401. started successfully (thanks to Damjan from Macdonia for the bug
  402. report).
  403. - Add new 'maintail' command to supervisorctl shell, which allows
  404. you to tail the 'main' supervisor log. This uses a new
  405. readMainLog xmlrpc API.
  406. - Various process-state-transition related changes, all internal.
  407. README.txt updated with new state transition map.
  408. - startProcess and startAllProcesses xmlrpc APIs changed: instead of
  409. accepting a timeout integer, these accept a wait boolean (timeout
  410. is implied by process' "startsecs" configuration). If wait is
  411. False, do not wait for startsecs.
  412. Known issues:
  413. Code does not match state transition map. Processes which are
  414. configured as autorestarting which start "successfully" but
  415. subsequently die after 'startsecs' go through the transitions
  416. RUNNING -> BACKOFF -> STARTING instead of the correct transitions
  417. RUNNING -> EXITED -> STARTING. This has no real negative effect,
  418. but should be fixed for correctness.
  419. 2.0
  420. - pidfile written in daemon mode had incorrect pid.
  421. - supervisorctl: tail (non -f) did not pass through proper error
  422. messages when supplied by the server.
  423. - Log signal name used to kill processes at debug level.
  424. - supervisorctl "tail -f" didn't work with supervisorctl sections
  425. configured with an absolute unix:// URL
  426. - New "environment" config file option allows you to add environment
  427. variable values to supervisord environment from config file.
  428. 2.0b1
  429. - fundamental rewrite based on 1.0.6, use distutils (only) for
  430. installation, use ConfigParser rather than ZConfig, use HTTP for
  431. wire protocol, web interface, less lies in supervisorctl.