CHANGES.txt 18 KB

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