CHANGES.txt 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  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. provides utilities for Python scripts which act as children of
  84. supervisord. Most notably, it contains an API method
  85. "getRPCInterface" allows you to obtain an xmlrpxlib ServerProxy
  86. that is willing to communicate with the parent supervisor. It
  87. also contains utility functions that allow for parsing of
  88. supervisor event listener protocol headers. A pair of scripts
  89. (loop_eventgen.py and loop_listener.py) were added to the script
  90. directory that serve as examples about how to use the childutils
  91. module.
  92. - A new envvar is added to child process environments:
  93. SUPERVISOR_SERVER_URL. This contains the server URL for the
  94. supervisord running the child.
  95. - An 'OK' URL was added at /ok.html which just returns the string
  96. 'OK' (can be used for up checks or speed checks via
  97. plain-old-HTTP).
  98. - An additional command-line option '--profile_options' is accepted
  99. by the supervisord script for developer use.
  100. supervisord -n -c sample.conf --profile_options=cumulative,calls
  101. The values are sort_stats options that can be passed to the
  102. standard Python profiler's PStats sort_stats method.
  103. When you exit supervisor, it will print Python profiling output to
  104. stdout.
  105. - If cElementTree is installed in the Python used to invoke
  106. supervisor, an alternate (faster, by about 2X) XML parser will be
  107. used to parse XML-RPC request bodies. cElementTree was added as
  108. an "extras_require" option in setup.py.
  109. - Added the ability to start, stop, and restart process groups to
  110. supervisorctl. To start a group, use "start groupname:*". To
  111. start multiple groups, use "start groupname1:* groupname2:*".
  112. Equivalent commands work for "stop" and "restart". You can mix and
  113. match short processnames, fullly-specified group:process names,
  114. and groupsplats on the same line for any of these commands.
  115. - Added 'directory' option to process config. If you set this
  116. option, supervisor will chdir to this directory before executing
  117. the child program (and thus it will be the child's cwd).
  118. - Added 'umask' option to process config. If you set this option,
  119. supervisor will set the umask of the child program. (Thanks to
  120. Ian Bicking for the suggestion).
  121. - A pair of scripts "osx_memmon_eventgen.py" and
  122. "osx_memmon_listener.py" have been added to the scripts directory.
  123. If they are used together as described in their comments,
  124. processes which are consuming "too much" memory will be restarted.
  125. The 'eventgen' script only works on OSX (my main development
  126. platform) but it should be trivially generalizable to other
  127. operating systems.
  128. - The long form "--configuration" (-c) command line option for
  129. supervisord was broken. Reported by Mike Orr. (Mike Naberezny)
  130. 3.0a2
  131. - Fixed the README.txt example for defining the supervisor RPC
  132. interface in the configuration file. Thanks to Drew Perttula.
  133. - Fixed a bug where process communication events would not have the
  134. proper payload if the payload data was very short.
  135. - when supervisord attempted to kill a process with SIGKILL after
  136. the process was not killed within "stopwaitsecs" using a "normal"
  137. kill signal, supervisord would crash with an improper
  138. AssertionError. Thanks to Calvin Hendryx-Parker.
  139. - On Linux, Supervisor would consume too much CPU in an effective
  140. "busywait" between the time a subprocess exited and the time at
  141. which supervisor was notified of its exit status. Thanks to Drew
  142. Perttula.
  143. - RPC interface behavior change: if the RPC method
  144. "sendProcessStdin" is called against a process that has closed its
  145. stdin file descriptor (e.g. it has done the equivalent of
  146. "sys.stdin.close(); os.close(0)"), we return a NO_FILE fault
  147. instead of accepting the data.
  148. - Changed the semantics of the process configuration 'autorestart'
  149. parameter with respect to processes which move between the RUNNING
  150. and EXITED state. 'autorestart' was previously a boolean. Now
  151. it's a trinary, accepting one of 'false', 'unexpected', or 'true'.
  152. If it's 'false', a process will never be automatically restarted
  153. from the EXITED state. If it's 'unexpected', a process that
  154. enters the EXITED state will be automatically restarted if it
  155. exited with an exit code that was not named in the process
  156. config's 'exitcodes' list. If it's 'true', a process that enters
  157. the EXITED state will be automatically restarted unconditionally.
  158. The default is now 'unexpected' (it was previously 'true'). The
  159. readdition of this feature is a reversion of the behavior change
  160. note in the changelog notes for 3.0a1 that asserted we never cared
  161. about the process' exit status when determining whether to restart
  162. it or not.
  163. - setup.py develop (and presumably setup.py install) would fail
  164. under Python 2.3.3, because setuptools attempted to import
  165. 'splituser' from urllib2, and it didn't exist.
  166. - It's now possible to use 'setup.py install' and 'setup.py develop'
  167. on systems which do not have a C compiler if you set the
  168. environment variable "NO_MELD3_EXTENSION_MODULES=1" in the shell
  169. in which you invoke these commands (versions of meld3 > 0.6.1
  170. respect this envvar and do not try to compile optional C
  171. extensions when it's set).
  172. - The test suite would fail on Python versions <= 2.3.3 because
  173. the "assertTrue" and "assertFalse" methods of unittest.TestCase
  174. didn't exist in those versions.
  175. - The 'supervisorctl' and 'supervisord' wrapper scripts were disused
  176. in favor of using setuptools' 'console_scripts' entry point settings.
  177. - Documentation files and the sample configuration file are put into
  178. the generated supervisor egg's 'doc' directory.
  179. _ Using the web interface would cause fairly dramatic memory
  180. leakage. We now require a version of meld3 that does not appear
  181. to leak memory from its C extensions (0.6.3).
  182. 3.0a1
  183. - Default config file comment documented 10 secs as default for
  184. 'startsecs' value in process config, in reality it was 1 sec.
  185. Thanks to Christoph Zwerschke.
  186. - Make note of subprocess environment behavior in README.txt.
  187. Thanks to Christoph Zwerschke.
  188. - New "strip_ansi" config file option attempts to strip ANSI escape
  189. sequences from logs for smaller/more readable logs (submitted by
  190. Mike Naberezny).
  191. - The XML-RPC method supervisor.getVersion() has been renamed for
  192. clarity to supervisor.getAPIVersion(). The old name is aliased
  193. for compatibility but is deprecated and will be removed in a
  194. future version (Mike Naberezny).
  195. - Improved web interface styling (Mike Naberezny, Derek DeVries)
  196. - The XML-RPC method supervisor.startProcess() now checks that
  197. the file exists and is executable (Mike Naberezny).
  198. - Two environment variables, "SUPERVISOR_PROCESS_NAME" and
  199. "SUPERVISOR_PROCESS_GROUP" are set in the environment of child
  200. processes, representing the name of the process and group in
  201. supervisor's configuration.
  202. - Process state map change: a process may now move directly from the
  203. STARTING state to the STOPPING state (as a result of a stop
  204. request).
  205. - Behavior change: if 'autorestart' is true, even if a process exits
  206. with an "expected" exit code, it will still be restarted. In the
  207. immediately prior release of supervisor, this was true anyway, and
  208. no one complained, so we're going to consider that the "officially
  209. correct" behavior from now on.
  210. - Supervisor now logs subprocess stdout and stderr independently.
  211. The old program config keys "logfile", "logfile_backups" and
  212. "logfile_maxbytes" are superseded by "stdout_logfile",
  213. "stdout_logfile_backups", and "stdout_logfile_maxbytes". Added
  214. keys include "stderr_logfile", "stderr_logfile_backups", and
  215. "stderr_logfile_maxbytes". An additional "redirect_stderr" key is
  216. used to cause program stderr output to be sent to its stdin
  217. channel. The keys "log_stderr" and "log_stdout" have been
  218. removed.
  219. - '[program:x]' config file sections now represent "homgeneous
  220. process groups" instead of single processes. A "numprocs" key in
  221. the section represents the number of processes that are in the
  222. group. A "process_name" key in the section allows composition of
  223. the each process' name within the homogeneous group.
  224. - A new kind of config file section, '[group:x]' now exists,
  225. allowing users to group heterogeneous processes together into a
  226. process group that can be controlled as a unit from a client.
  227. - Supervisord now emits "events" at certain points in its normal
  228. operation. These events include supervisor state change events,
  229. process state change events, and "process communication events".
  230. - A new kind of config file section '[eventlistener:x]' now exists.
  231. Each section represents an "event listener pool", which is a
  232. special kind of homogeneous process group. Each process in the
  233. pool is meant to receive supervisor "events" via its stdin and
  234. perform some notification (e.g. send a mail, log, make an http
  235. request, etc.)
  236. - Supervisord can now capture data between special tokens in
  237. subprocess stdout/stderr output and emit a "process communications
  238. event" as a result.
  239. - Supervisor's XML-RPC interface may be extended arbitrarily by
  240. programmers. Additional top-level namespace XML-RPC interfaces
  241. can be added using the '[rpcinterface:foo]' declaration in the
  242. configuration file.
  243. - New 'supervisor'-namespace XML-RPC methods have been added:
  244. getAPIVersion (returns the XML-RPC API version, the older
  245. "getVersion" is now deprecated), "startProcessGroup" (starts all
  246. processes in a supervisor process group), "stopProcessGroup"
  247. (stops all processes in a supervisor process group), and
  248. "sendProcessStdin" (sends data to a process' stdin file
  249. descriptor).
  250. - 'supervisor'-namespace XML-RPC methods which previously accepted
  251. ony a process name as "name" (startProcess, stopProcess,
  252. getProcessInfo, readProcessLog, tailProcessLog, and
  253. clearProcessLog) now accept a "name" which may contain both the
  254. process name and the process group name in the form
  255. 'groupname:procname'. For backwards compatibility purposes,
  256. "simple" names will also be accepted but will be expanded
  257. internally (e.g. if "foo" is sent as a name, it will be expanded
  258. to "foo:foo", representing the foo process within the foo process
  259. group).
  260. - 2.X versions of supervisorctl will work against supervisor 3.0
  261. servers in a degraded fashion, but 3.X versions of supervisorctl
  262. will not work at all against supervisor 2.X servers.
  263. Known issues:
  264. - supervisorctl and the web interface do not yet allow you to stop
  265. / start / restart a process group as a unit.
  266. - supervisorctl and the web interface do not allow you to tail or
  267. otherwise examine stderr log files of processes.
  268. - buffered event notifications may be lost at supervisor shutdown
  269. or restart time.
  270. Acknowledgements:
  271. Maintainable Software (http://www.maintainable.com) contracted
  272. Agendless Consulting to add the event notification features and
  273. extensible XML-RPC namespaces feature to supervisor.
  274. 2.2b1
  275. - Individual program configuration sections can now specify an
  276. environment.
  277. - Added a 'version' command to supervisorctl. This returns the
  278. version of the supervisor2 package which the remote supervisord
  279. process is using.
  280. 2.1
  281. - When supervisord was invoked more than once, and its configuration
  282. was set up to use a UNIX domain socket as the HTTP server, the
  283. socket file would be erased in error. The symptom of this was
  284. that a subsequent invocation of supervisorctl could not find the
  285. socket file, so the process could not be controlled (it and all of
  286. its subprocesses would need to be killed by hand).
  287. - Close subprocess file descriptors properly when a subprocess exits
  288. or otherwise dies. This should result in fewer "too many open
  289. files to spawn foo" messages when supervisor is left up for long
  290. periods of time.
  291. - When a process was not killable with a "normal" signal at shutdown
  292. time, too many "INFO: waiting for x to die" messages would be sent
  293. to the log until we ended up killing the process with a SIGKILL.
  294. Now a maximum of one every three seconds is sent up until SIGKILL
  295. time. Thanks to Ian Bicking.
  296. - Add an assertion: we never want to try to marshal None to XML-RPC
  297. callers. Issue 223 in the collector from vgatto indicates that
  298. somehow a supervisor XML-RPC method is returning None (which
  299. should never happen), but I cannot identify how. Maybe the
  300. assertion will give us more clues if it happens again.
  301. - Supervisor would crash when run under Python 2.5 because the
  302. xmlrpclib.Transport class in Python 2.5 changed in a
  303. backward-incompatible way. Thanks to Eric Westra for the bug
  304. report and a fix.
  305. - Tests now pass under Python 2.5.
  306. - Better supervisorctl reporting on stop requests that have a FAILED
  307. status.
  308. - Removed duplicated code (readLog/readMainLog), thanks to Mike
  309. Naberezny.
  310. - Added tailProcessLog command to the XML-RPC API. It provides a
  311. more efficient way to tail logs than readProcessLog(). Use
  312. readProcessLog() to read chunks and tailProcessLog() to tail.
  313. (thanks to Mike Naberezny).
  314. 2.1b2
  315. - Added new tailProcessLog() command to the XML-RPC API that
  316. is more efficient for just tailing than the existing
  317. readProcessLog() command (Mike Naberezny).
  318. 2.1b1
  319. - "supervisord -h" and "supervisorctl -h" did not work (traceback
  320. instead of showing help view (thanks to Damjan from Macedonia for
  321. the bug report).
  322. - Processes which started successfully after failing to start
  323. initially are no longer reported in BACKOFF state once they are
  324. started successfully (thanks to Damjan from Macdonia for the bug
  325. report).
  326. - Add new 'maintail' command to supervisorctl shell, which allows
  327. you to tail the 'main' supervisor log. This uses a new
  328. readMainLog xmlrpc API.
  329. - Various process-state-transition related changes, all internal.
  330. README.txt updated with new state transition map.
  331. - startProcess and startAllProcesses xmlrpc APIs changed: instead of
  332. accepting a timeout integer, these accept a wait boolean (timeout
  333. is implied by process' "startsecs" configuration). If wait is
  334. False, do not wait for startsecs.
  335. Known issues:
  336. Code does not match state transition map. Processes which are
  337. configured as autorestarting which start "successfully" but
  338. subsequently die after 'startsecs' go through the transitions
  339. RUNNING -> BACKOFF -> STARTING instead of the correct transitions
  340. RUNNING -> EXITED -> STARTING. This has no real negative effect,
  341. but should be fixed for correctness.
  342. 2.0
  343. - pidfile written in daemon mode had incorrect pid.
  344. - supervisorctl: tail (non -f) did not pass through proper error
  345. messages when supplied by the server.
  346. - Log signal name used to kill processes at debug level.
  347. - supervisorctl "tail -f" didn't work with supervisorctl sections
  348. configured with an absolute unix:// URL
  349. - New "environment" config file option allows you to add environment
  350. variable values to supervisord environment from config file.
  351. 2.0b1
  352. - fundamental rewrite based on 1.0.6, use distutils (only) for
  353. installation, use ConfigParser rather than ZConfig, use HTTP for
  354. wire protocol, web interface, less lies in supervisorctl.