-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
CHANGES.txt
1509 lines (1141 loc) · 63.8 KB
/
CHANGES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
3.2.0 (2015-11-30)
------------------
- Files included via the ``[include]`` section are read in sorted order. In
past versions, the order was undefined. Patch by Ionel Cristian Mărieș.
- ``supervisorctl start`` and ``supervisorctl stop`` now complete more quickly
when handling many processes. Thanks to Chris McDonough for this patch.
See: https://github.com/Supervisor/supervisor/issues/131
- Environment variables are now expanded for all config file options.
Patch by Dexter Tad-y.
- Added ``signalProcess``, ``signalProcessGroup``, and ``signalAllProcesses``
XML-RPC methods to supervisor RPC interface. Thanks to Casey Callendrello,
Marc Abramowitz, and Moriyoshi Koizumi for the patches.
- Added ``signal`` command to supervisorctl. Thanks to Moriyoshi Koizumi and
Marc Abramowitz for the patches.
- Errors caused by bad values in a config file now show the config section
to make debugging easier. Patch by Marc Abramowitz.
- Setting ``redirect_stderr=true`` in an `[eventlistener:x]`` section is now
disallowed because any messages written to ``stderr`` would interfere
with the eventlistener protocol on ``stdout``.
- Fixed a bug where spawning a process could cause ``supervisord`` to crash
if an ``IOError`` occurred while setting up logging. One way this could
happen is if a log filename was accidentally set to a directory instead
of a file. Thanks to Grzegorz Nosek for reporting this issue.
- Fixed a bug introduced in 3.1.0 where ``supervisord`` could crash when
attempting to display a resource limit error.
- Fixed a bug where ``supervisord`` could crash with the message
``Assertion failed for processname: RUNNING not in STARTING`` if a time
change caused the last start time of the process to be in the future.
Thanks to Róbert Nagy, Sergey Leschenko, and samhair for the patches.
- A warning is now logged if an eventlistener enters the UNKNOWN state,
which usually indicates a bug in the eventlistener. Thanks to Steve
Winton and detailyang for reporting issues that led to this change.
- Errors from the web interface are now logged at the ``ERROR`` level.
Previously, they were logged at the ``TRACE`` level and easily
missed. Thanks to Thomas Güttler for reporting this issue.
- Fixed ``DeprecationWarning: Parameters to load are deprecated. Call
.resolve and .require separately.`` on setuptools >= 11.3.
- If ``redirect_stderr=true`` and ``stderr_logfile=auto``, no stderr log
file will be created. In previous versions, an empty stderr log file
would be created. Thanks to Łukasz Kożuchowski for the initial patch.
- Fixed an issue in Medusa that would cause ``supervisorctl tail -f`` to
disconnect if many other ``supervisorctl`` commands were run in parallel.
Patch by Stefan Friesel.
3.1.3 (2014-10-28)
------------------
- Fixed an XML-RPC bug where the ElementTree-based parser handled strings
like ``<value><string>hello</string></value>`` but not strings like
``<value>hello</value>``, which are valid in the XML-RPC spec. This
fixes compatibility with the Apache XML-RPC client for Java and
possibly other clients.
3.1.2 (2014-09-07)
------------------
- Fixed a bug where ``tail group:*`` in ``supervisorctl`` would show a 500
Internal Server Error rather than a BAD_NAME fault.
- Fixed a bug where the web interface would show a 500 Internal Server Error
instead of an error message for some process start faults.
- Removed medusa files not used by Supervisor.
3.1.1 (2014-08-11)
------------------
- Fixed a bug where ``supervisorctl tail -f name`` output would stop if log
rotation occurred while tailing.
- Prevent a crash when a greater number file descriptors were attempted to be
opened than permitted by the environment when starting a bunch of programs.
Now, instead a spawn error is logged.
- Compute "channel delay" properly, fixing symptoms where a supervisorctl start
command would hang for a very long time when a process (or many processes)
are spewing to their stdout or stderr. See comments attached to
https://github.com/Supervisor/supervisor/pull/263 .
- Added ``docs/conf.py``, ``docs/Makefile``, and ``supervisor/scripts/*.py``
to the release package.
3.1.0 (2014-07-29)
------------------
- The output of the ``start``, ``stop``, ``restart``, and ``clear`` commands
in ``supervisorctl`` has been changed to be consistent with the ``status``
command. Previously, the ``status`` command would show a process like
``foo:foo_01`` but starting that process would show ``foo_01: started``
(note the group prefix ``foo:`` was missing). Now, starting the process
will show ``foo:foo_01: started``. Suggested by Chris Wood.
- The ``status`` command in ``supervisorctl`` now supports group name
syntax: ``status group:*``.
- The process column in the table output by the ``status`` command in
``supervisorctl`` now expands to fit the widest name.
- The ``update`` command in ``supervisorctl`` now accepts optional group
names. When group names are specified, only those groups will be
updated. Patch by Gary M. Josack.
- Tab completion in ``supervisorctl`` has been improved and now works for
more cases. Thanks to Mathieu Longtin and Marc Abramowitz for the patches.
- Attempting to start or stop a process group in ``supervisorctl`` with the
``group:*`` syntax will now show the same error message as the ``process``
syntax if the name does not exist. Previously, it would show a Python
exception. Patch by George Ang.
- Added new ``PROCESS_GROUP_ADDED`` and ``PROCESS_GROUP_REMOVED`` events.
These events are fired when process groups are added or removed from
Supervisor's runtime configuration when using the ``add`` and ``remove``
commands in ``supervisorctl``. Patch by Brent Tubbs.
- Stopping a process in the backoff state now changes it to the stopped
state. Previously, an attempt to stop a process in backoff would be
ignored. Patch by Pascal Varet.
- The ``directory`` option is now expanded separately for each process in
a homogeneous process group. This allows each process to have its own
working directory. Patch by Perttu Ranta-aho.
- Removed ``setuptools`` from the ``requires`` list in ``setup.py`` because
it caused installation issues on some systems.
- Fixed a bug in Medusa where the HTTP Basic authorizer would cause an
exception if the password contained a colon. Thanks to Thomas Güttler
for reporting this issue.
- Fixed an XML-RPC bug where calling supervisor.clearProcessLogs() with a
name like ``group:*`` would cause a 500 Internal Server Error rather than
returning a BAD_NAME fault.
- Fixed a hang that could occur in ``supervisord`` if log rotation is used
and an outside program deletes an active log file. Patch by Magnus Lycka.
- A warning is now logged if a glob pattern in an ``[include]`` section does
not match any files. Patch by Daniel Hahler.
3.0 (2013-07-30)
----------------
- Parsing the config file will now fail with an error message if a process
or group name contains characters that are not compatible with the
eventlistener protocol.
- Fixed a bug where the ``tail -f`` command in ``supervisorctl`` would fail
if the combined length of the username and password was over 56 characters.
- Reading the config file now gives a separate error message when the config
file exists but can't be read. Previously, any error reading the file
would be reported as "could not find config file". Patch by Jens Rantil.
- Fixed an XML-RPC bug where array elements after the first would be ignored
when using the ElementTree-based XML parser. Patch by Zev Benjamin.
- Fixed the usage message output by ``supervisorctl`` to show the correct
default config file path. Patch by Alek Storm.
3.0b2 (2013-05-28)
------------------
- The behavior of the program option ``user`` has changed. In all previous
versions, if ``supervisord`` failed to switch to the user, a warning would
be sent to the stderr log but the child process would still be spawned.
This means that a mistake in the config file could result in a child
process being unintentionally spawned as root. Now, ``supervisord`` will
not spawn the child unless it was able to successfully switch to the user.
Thanks to Igor Partola for reporting this issue.
- If a user specified in the config file does not exist on the system,
``supervisord`` will now print an error and refuse to start.
- Reverted a change to logging introduced in 3.0b1 that was intended to allow
multiple processes to log to the same file with the rotating log handler.
The implementation caused supervisord to crash during reload and to leak
file handles. Also, since log rotation options are given on a per-program
basis, impossible configurations could be created (conflicting rotation
options for the same file). Given this and that supervisord now has syslog
support, it was decided to remove this feature. A warning was added to the
documentation that two processes may not log to the same file.
- Fixed a bug where parsing ``command=`` could cause supervisord to crash if
shlex.split() fails, such as a bad quoting. Patch by Scott Wilson.
- It is now possible to use ``supervisorctl`` on a machine with no
``supervisord.conf`` file by supplying the connection information in
command line options. Patch by Jens Rantil.
- Fixed a bug where supervisord would crash if the syslog handler was used
and supervisord received SIGUSR2 (log reopen request).
- Fixed an XML-RPC bug where calling supervisor.getProcessInfo() with a bad
name would cause a 500 Internal Server Error rather than the returning
a BAD_NAME fault.
- Added a favicon to the web interface. Patch by Caio Ariede.
- Fixed a test failure due to incorrect handling of daylight savings time
in the childutils tests. Patch by Ildar Hizbulin.
- Fixed a number of pyflakes warnings for unused variables, imports, and
dead code. Patch by Philippe Ombredanne.
3.0b1 (2012-09-10)
------------------
- Fixed a bug where parsing ``environment=`` did not verify that key/value
pairs were correctly separated. Patch by Martijn Pieters.
- Fixed a bug in the HTTP server code that could cause unnecessary delays
when sending large responses. Patch by Philip Zeyliger.
- When supervisord starts up as root, if the ``-c`` flag was not provided, a
warning is now emitted to the console. Rationale: supervisord looks in the
current working directory for a ``supervisord.conf`` file; someone might
trick the root user into starting supervisord while cd'ed into a directory
that has a rogue ``supervisord.conf``.
- A warning was added to the documentation about the security implications of
starting supervisord without the ``-c`` flag.
- Add a boolean program option ``stopasgroup``, defaulting to false.
When true, the flag causes supervisor to send the stop signal to the
whole process group. This is useful for programs, such as Flask in debug
mode, that do not propagate stop signals to their children, leaving them
orphaned.
- Python 2.3 is no longer supported. The last version that supported Python
2.3 is Supervisor 3.0a12.
- Removed the unused "supervisor_rpc" entry point from setup.py.
- Fixed a bug in the rotating log handler that would cause unexpected
results when two processes were set to log to the same file. Patch
by Whit Morriss.
- Fixed a bug in config file reloading where each reload could leak memory
because a list of warning messages would be appended but never cleared.
Patch by Philip Zeyliger.
- Added a new Syslog log handler. Thanks to Denis Bilenko, Nathan L. Smith,
and Jason R. Coombs, who each contributed to the patch.
- Put all change history into a single file (CHANGES.txt).
3.0a12 (2011-12-06)
-------------------
- Released to replace a broken 3.0a11 package where non-Python files were
not included in the package.
3.0a11 (2011-12-06)
-------------------
- Added a new file, ``PLUGINS.rst``, with a listing of third-party plugins
for Supervisor. Contributed by Jens Rantil.
- The ``pid`` command in supervisorctl can now be used to retrieve the PIDs
of child processes. See ``help pid``. Patch by Gregory Wisniewski.
- Added a new ``host_node_name`` expansion that will be expanded to the
value returned by Python's ``platform.node`` (see
http://docs.python.org/library/platform.html#platform.node).
Patch by Joseph Kondel.
- Fixed a bug in the web interface where pages over 64K would be truncated.
Thanks to Drew Perttula and Timothy Jones for reporting this.
- Renamed ``README.txt`` to ``README.rst`` so GitHub renders the file as
ReStructuredText.
- The XML-RPC server is now compatible with clients that do not send empty
<params> when there are no parameters for the method call. Thanks to
Johannes Becker for reporting this.
- Fixed ``supervisorctl --help`` output to show the correct program name.
- The behavior of the configuration options ``minfds`` and ``minprocs`` has
changed. Previously, if a hard limit was less than ``minfds`` or
``minprocs``, supervisord would unconditionally abort with an error. Now,
supervisord will attempt to raise the hard limit. This may succeed if
supervisord is run as root, otherwise the error is printed as before.
Patch by Benoit Sigoure.
- Add a boolean program option ``killasgroup``, defaulting to false,
if true when resorting to send SIGKILL to stop/terminate the process
send it to its whole process group instead to take care of possible
children as well and not leave them behind. Patch by Samuele Pedroni.
- Environment variables may now be used in the configuration file
for options that support string expansion. Patch by Aleksey Sivokon.
- Fixed a race condition where supervisord might not act on a signal sent
to it. Thanks to Adar Dembo for reporting the issue and supplying the
initial patch.
- Updated the output of ``echo_supervisord_conf`` to fix typos and
improve comments. Thanks to Jens Rantil for noticing these.
- Fixed a possible 500 Server Error from the web interface. This was
observed when using Supervisor on a domain socket behind Nginx, where
Supervisor would raise an exception because REMOTE_ADDR was not set.
Patch by David Bennett.
3.0a10 (2011-03-30)
-------------------
- Fixed the stylesheet of the web interface so the footer line won't overlap
a long process list. Thanks to Derek DeVries for the patch.
- Allow rpc interface plugins to register new events types.
- Bug fix for FCGI sockets not getting cleaned up when the ``reload`` command
is issued from supervisorctl. Also, the default behavior has changed for
FCGI sockets. They are now closed whenever the number of running processes
in a group hits zero. Previously, the sockets were kept open unless a
group-level stop command was issued.
- Better error message when HTTP server cannot reverse-resolve a hostname to
an IP address. Previous behavior: show a socket error. Current behavior:
spit out a suggestion to stdout.
- Environment variables set via ``environment=`` value within
``[supervisord]`` section had no effect. Thanks to Wyatt Baldwin
for a patch.
- Fix bug where stopping process would cause process output that happened
after the stop request was issued to be lost. See
https://github.com/Supervisor/supervisor/issues/11.
- Moved 2.X change log entries into ``HISTORY.txt``.
- Converted ``CHANGES.txt`` and ``README.txt`` into proper ReStructuredText
and included them in the ``long_description`` in ``setup.py``.
- Added a tox.ini to the package (run via ``tox`` in the package dir). Tests
supervisor on multiple Python versions.
3.0a9 (2010-08-13)
------------------
- Use rich comparison methods rather than __cmp__ to sort process configs and
process group configs to better straddle Python versions. (thanks to
Jonathan Riboux for identifying the problem and supplying an initial
patch).
- Fixed test_supervisorctl.test_maintail_dashf test for Python 2.7. (thanks
to Jonathan Riboux for identifying the problem and supplying an initial
patch).
- Fixed the way that supervisor.datatypes.url computes a "good" URL
for compatibility with Python 2.7 and Python >= 2.6.5. URLs with
bogus "schemes://" will now be accepted as a version-straddling
compromise (before they were rejected before supervisor would
start). (thanks to Jonathan Riboux for identifying the problem
and supplying an initial patch).
- Add a ``-v`` / ``--version`` option to supervisord: Print the
supervisord version number out to stdout and exit. (Roger Hoover)
- Import iterparse from xml.etree when available (eg: Python 2.6). Patch
by Sidnei da Silva.
- Fixed the url to the supervisor-users mailing list. Patch by
Sidnei da Silva
- When parsing "environment=" in the config file, changes introduced in
3.0a8 prevented Supervisor from parsing some characters commonly
found in paths unless quoting was used as in this example::
environment=HOME='/home/auser'
Supervisor once again allows the above line to be written as::
environment=HOME=/home/auser
Alphanumeric characters, "_", "/", ".", "+", "-", "(", ")", and ":" can all
be used as a value without quoting. If any other characters are needed in
the value, please quote it as in the first example above. Thanks to Paul
Heideman for reporting this issue.
- Supervisor will now look for its config file in locations relative to the
executable path, allowing it to be used more easily in virtual
environments. If sys.argv[0] is ``/path/to/venv/bin/supervisorctl``,
supervisor will now look for it's config file in
``/path/to/venv/etc/supervisord.conf`` and
``/path/to/venv/supervisord.conf`` in addition to the other standard
locations. Patch by Chris Rossi.
3.0a8 (2010-01-20)
------------------
- Don't cleanup file descriptors on first supervisord invocation:
this is a lame workaround for Snow Leopard systems that use
libdispatch and are receiving "Illegal instruction" messages at
supervisord startup time. Restarting supervisord via
"supervisorctl restart" may still cause a crash on these systems.
- Got rid of Medusa hashbang headers in various files to ease RPM
packaging.
- Allow umask to be 000 (patch contributed by Rowan Nairn).
- Fixed a bug introduced in 3.0a7 where supervisorctl wouldn't ask
for a username/password combination properly from a
password-protected supervisord if it wasn't filled in within the
"[supervisorctl]" section username/password values. It now
properly asks for a username and password.
- Fixed a bug introduced in 3.0a7 where setup.py would not detect the
Python version correctly. Patch by Daniele Paolella.
- Fixed a bug introduced in 3.0a7 where parsing a string of key/value
pairs failed on Python 2.3 due to use of regular expression syntax
introduced in Python 2.4.
- Removed the test suite for the ``memmon`` console script, which was
moved to the Superlance package in 3.0a7.
- Added release dates to CHANGES.txt.
- Reloading the config for an fcgi process group did not close the fcgi
socket - now, the socket is closed whenever the group is stopped as a unit
(including during config update). However, if you stop all the processes
in a group individually, the socket will remain open to allow for graceful
restarts of FCGI daemons. (Roger Hoover)
- Rereading the config did not pick up changes to the socket parameter in a
fcgi-program section. (Roger Hoover)
- Made a more friendly exception message when a FCGI socket cannot be
created. (Roger Hoover)
- Fixed a bug where the --serverurl option of supervisorctl would not
accept a URL with a "unix" scheme. (Jason Kirtland)
- Running the tests now requires the "mock" package. This dependency has
been added to "tests_require" in setup.py. (Roger Hoover)
- Added support for setting the ownership and permissions for an FCGI socket.
This is done using new "socket_owner" and "socket_mode" options in an
[fcgi-program:x] section. See the manual for details. (Roger Hoover)
- Fixed a bug where the FCGI socket reference count was not getting
decremented on spawn error. (Roger Hoover)
- Fixed a Python 2.6 deprecation warning on use of the "sha" module.
- Updated ez_setup.py to one that knows about setuptools 0.6c11.
- Running "supervisorctl shutdown" no longer dumps a Python backtrace
when it can't connect to supervisord on the expected socket. Thanks
to Benjamin Smith for reporting this.
- Removed use of collections.deque in our bundled version of asynchat
because it broke compatibility with Python 2.3.
- The sample configuration output by "echo_supervisord_conf" now correctly
shows the default for "autorestart" as "unexpected". Thanks to
William Dode for noticing it showed the wrong value.
3.0a7 (2009-05-24)
------------------
- We now bundle our own patched version of Medusa contributed by Jason
Kirtland to allow Supervisor to run on Python 2.6. This was done
because Python 2.6 introduced backwards incompatible changes to
asyncore and asynchat in the stdlib.
- The console script ``memmon``, introduced in Supervisor 3.0a4, has
been moved to Superlance (http://pypi.python.org/pypi/superlance).
The Superlance package contains other useful monitoring tools designed
to run under Supervisor.
- Supervisorctl now correctly interprets all of the error codes that can
be returned when starting a process. Patch by Francesc Alted.
- New ``stdout_events_enabled`` and ``stderr_events_enabled`` config options
have been added to the ``[program:x]``, ``[fcgi-program:x]``, and
``[eventlistener:x]`` sections. These enable the emitting of new
PROCESS_LOG events for a program. If unspecified, the default is False.
If enabled for a subprocess, and data is received from the stdout or
stderr of the subprocess while not in the special capture mode used by
PROCESS_COMMUNICATION, an event will be emitted.
Event listeners can subscribe to either PROCESS_LOG_STDOUT or
PROCESS_LOG_STDERR individually, or PROCESS_LOG for both.
- Values for subprocess environment variables specified with environment=
in supervisord.conf can now be optionally quoted, allowing them to
contain commas. Patch by Tim Godfrey.
- Added a new event type, REMOTE_COMMUNICATION, that is emitted by a new
RPC method, supervisor.sendRemoteCommEvent().
- Patch for bug #268 (KeyError on ``here`` expansion for
stdout/stderr_logfile) from David E. Kindred.
- Add ``reread``, ``update``, and ``avail`` commands based on Anders
Quist's ``online_config_reload.diff`` patch. This patch extends
the "add" and "drop" commands with automagical behavior::
In supervisorctl:
supervisor> status
bar RUNNING pid 14864, uptime 18:03:42
baz RUNNING pid 23260, uptime 0:10:16
foo RUNNING pid 14866, uptime 18:03:42
gazonk RUNNING pid 23261, uptime 0:10:16
supervisor> avail
bar in use auto 999:999
baz in use auto 999:999
foo in use auto 999:999
gazonk in use auto 999:999
quux avail auto 999:999
Now we add this to our conf:
[group:zegroup]
programs=baz,gazonk
Then we reread conf:
supervisor> reread
baz: disappeared
gazonk: disappeared
quux: available
zegroup: available
supervisor> avail
bar in use auto 999:999
foo in use auto 999:999
quux avail auto 999:999
zegroup:baz avail auto 999:999
zegroup:gazonk avail auto 999:999
supervisor> status
bar RUNNING pid 14864, uptime 18:04:18
baz RUNNING pid 23260, uptime 0:10:52
foo RUNNING pid 14866, uptime 18:04:18
gazonk RUNNING pid 23261, uptime 0:10:52
The magic make-it-so command:
supervisor> update
baz: stopped
baz: removed process group
gazonk: stopped
gazonk: removed process group
zegroup: added process group
quux: added process group
supervisor> status
bar RUNNING pid 14864, uptime 18:04:43
foo RUNNING pid 14866, uptime 18:04:43
quux RUNNING pid 23561, uptime 0:00:02
zegroup:baz RUNNING pid 23559, uptime 0:00:02
zegroup:gazonk RUNNING pid 23560, uptime 0:00:02
supervisor> avail
bar in use auto 999:999
foo in use auto 999:999
quux in use auto 999:999
zegroup:baz in use auto 999:999
zegroup:gazonk in use auto 999:999
- Fix bug with symptom "KeyError: 'process_name'" when using a logfile name
including documented``process_name`` Python string expansions.
- Tab completions in the supervisorctl shell, and a foreground mode for
Supervisor, implemented as a part of GSoC. The supervisorctl program now
has a ``fg`` command, which makes it possible to supply inputs to a
process, and see its output/error stream in real time.
- Process config reloading implemented by Anders Quist. The
supervisorctl program now has the commands "add" and "drop".
"add <programname>" adds the process group implied by <programname>
in the config file. "drop <programname>" removes the process
group from the running configuration (it must already be stopped).
This makes it possible to add processes to and remove processes from
a running supervisord without restarting the supervisord process.
- Fixed a bug where opening the HTTP servers would fail silently
for socket errors other than errno.EADDRINUSE.
- Thanks to Dave Peticolas, using "reload" against a supervisord
that is running in the background no longer causes supervisord
to crash.
- Configuration options for logfiles now accept mixed case reserved
words (e.g. "AUTO" or "auto") for consistency with other options.
- childutils.eventdata was buggy, it could not deal with carriage returns
in data. See http://www.plope.com/software/collector/257. Thanks
to Ian Bicking.
- Per-process exitcodes= configuration now will not accept exit
codes that are not 8-bit unsigned integers (supervisord will not
start when one of the exit codes is outside the range of 0 - 255).
- Per-process ``directory`` value can now contain expandable values like
``%(here)s``. (See http://www.plope.com/software/collector/262).
- Accepted patch from Roger Hoover to allow for a new sort of
process group: "fcgi-program". Adding one of these to your
supervisord.conf allows you to control fastcgi programs. FastCGI
programs cannot belong to heterogenous groups.
The configuration for FastCGI programs is the same as regular programs
except an additional "socket" parameter. Substitution happens on the
socket parameter with the ``here`` and ``program_name`` variables::
[fcgi-program:fcgi_test]
;socket=tcp://localhost:8002
socket=unix:///path/to/fcgi/socket
- Supervisorctl now supports a plugin model for supervisorctl
commands.
- Added the ability to retrieve supervisord's own pid through
supervisor.getPID() on the XML-RPC interface or a new
"pid" command on supervisorctl.
3.0a6 (2008-04-07)
------------------
- The RotatingFileLogger had a race condition in its doRollover
method whereby a file might not actually exist despite a call to
os.path.exists on the line above a place where we try to remove
it. We catch the exception now and ignore the missing file.
3.0a5 (2008-03-13)
------------------
- Supervisorctl now supports persistent readline history. To
enable, add "history_file = <pathname>" to the ``[supervisorctl]``
section in your supervisord.conf file.
- Multiple commands may now be issued on one supervisorctl command
line, e.g. "restart prog; tail -f prog". Separate commands with a
single semicolon; they will be executed in order as you would
expect.
3.0a4 (2008-01-30)
------------------
- 3.0a3 broke Python 2.3 backwards compatibility.
- On Debian Sarge, one user reported that a call to
options.mktempfile would fail with an "[Errno 9] Bad file
descriptor" at supervisord startup time. I was unable to
reproduce this, but we found a workaround that seemed to work for
him and it's included in this release. See
http://www.plope.com/software/collector/252 for more information.
Thanks to William Dode.
- The fault ``ALREADY_TERMINATED`` has been removed. It was only raised by
supervisor.sendProcessStdin(). That method now returns ``NOT_RUNNING``
for parity with the other methods. (Mike Naberezny)
- The fault TIMED_OUT has been removed. It was not used.
- Supervisor now depends on meld3 0.6.4, which does not compile its
C extensions by default, so there is no more need to faff around
with NO_MELD3_EXTENSION_MODULES during installation if you don't
have a C compiler or the Python development libraries on your
system.
- Instead of making a user root around for the sample.conf file,
provide a convenience command "echo_supervisord_conf", which he can
use to echo the sample.conf to his terminal (and redirect to a file
appropriately). This is a new user convenience (especially one who
has no Python experience).
- Added ``numprocs_start`` config option to ``[program:x]`` and
``[eventlistener:x]`` sections. This is an offset used to compute
the first integer that ``numprocs`` will begin to start from.
Contributed by Antonio Beamud Montero.
- Added capability for ``[include]`` config section to config format.
This section must contain a single key "files", which must name a
space-separated list of file globs that will be included in
supervisor's configuration. Contributed by Ian Bicking.
- Invoking the ``reload`` supervisorctl command could trigger a bug in
supervisord which caused it to crash. See
http://www.plope.com/software/collector/253 . Thanks to William Dode for
a bug report.
- The ``pidproxy`` script was made into a console script.
- The ``password`` value in both the ``[inet_http_server]`` and
``[unix_http_server]`` sections can now optionally be specified as a SHA
hexdigest instead of as cleartext. Values prefixed with ``{SHA}`` will be
considered SHA hex digests. To encrypt a password to a form suitable for
pasting into the configuration file using Python, do, e.g.::
>>> import sha
>>> '{SHA}' + sha.new('thepassword').hexdigest()
'{SHA}82ab876d1387bfafe46cc1c8a2ef074eae50cb1d'
- The subtypes of the events PROCESS_STATE_CHANGE (and
PROCESS_STATE_CHANGE itself) have been removed, replaced with a
simpler set of PROCESS_STATE subscribable event types.
The new event types are:
PROCESS_STATE_STOPPED
PROCESS_STATE_EXITED
PROCESS_STATE_STARTING
PROCESS_STATE_STOPPING
PROCESS_STATE_BACKOFF
PROCESS_STATE_FATAL
PROCESS_STATE_RUNNING
PROCESS_STATE_UNKNOWN
PROCESS_STATE # abstract
PROCESS_STATE_STARTING replaces:
PROCESS_STATE_CHANGE_STARTING_FROM_STOPPED
PROCESS_STATE_CHANGE_STARTING_FROM_BACKOFF
PROCESS_STATE_CHANGE_STARTING_FROM_EXITED
PROCESS_STATE_CHANGE_STARTING_FROM_FATAL
PROCESS_STATE_RUNNING replaces
PROCESS_STATE_CHANGE_RUNNING_FROM_STARTED
PROCESS_STATE_BACKOFF replaces
PROCESS_STATE_CHANGE_BACKOFF_FROM_STARTING
PROCESS_STATE_STOPPING replaces:
PROCESS_STATE_CHANGE_STOPPING_FROM_RUNNING
PROCESS_STATE_CHANGE_STOPPING_FROM_STARTING
PROCESS_STATE_EXITED replaces
PROCESS_STATE_CHANGE_EXITED_FROM_RUNNING
PROCESS_STATE_STOPPED replaces
PROCESS_STATE_CHANGE_STOPPED_FROM_STOPPING
PROCESS_STATE_FATAL replaces
PROCESS_STATE_CHANGE_FATAL_FROM_BACKOFF
PROCESS_STATE_UNKNOWN replaces PROCESS_STATE_CHANGE_TO_UNKNOWN
PROCESS_STATE replaces PROCESS_STATE_CHANGE
The PROCESS_STATE_CHANGE_EXITED_OR_STOPPED abstract event is gone.
All process state changes have at least "processname",
"groupname", and "from_state" (the name of the previous state) in
their serializations.
PROCESS_STATE_EXITED additionally has "expected" (1 or 0) and "pid"
(the process id) in its serialization.
PROCESS_STATE_RUNNING, PROCESS_STATE_STOPPING,
PROCESS_STATE_STOPPED additionally have "pid" in their
serializations.
PROCESS_STATE_STARTING and PROCESS_STATE_BACKOFF have "tries" in
their serialization (initially "0", bumped +1 each time a start
retry happens).
- Remove documentation from README.txt, point people to
http://supervisord.org/manual/ .
- The eventlistener request/response protocol has changed. OK/FAIL
must now be wrapped in a RESULT envelope so we can use it for more
specialized communications.
Previously, to signify success, an event listener would write the string
``OK\n`` to its stdout. To signify that the event was seen but couldn't
be handled by the listener and should be rebuffered, an event listener
would write the string ``FAIL\n`` to its stdout.
In the new protocol, the listener must write the string::
RESULT {resultlen}\n{result}
For example, to signify OK::
RESULT 2\nOK
To signify FAIL::
RESULT 4\nFAIL
See the scripts/sample_eventlistener.py script for an example.
- To provide a hook point for custom results returned from event
handlers (see above) the [eventlistener:x] configuration sections
now accept a "result_handler=" parameter,
e.g. "result_handler=supervisor.dispatchers:default_handler" (the
default) or "handler=mypackage:myhandler". The keys are pkgutil
"entry point" specifications (importable Python function names).
Result handlers must be callables which accept two arguments: one
named "event" which represents the event, and the other named
"result", which represents the listener's result. A result
handler either executes successfully or raises an exception. If
it raises a supervisor.dispatchers.RejectEvent exception, the
event will be rebuffered, and the eventhandler will be placed back
into the ACKNOWLEDGED state. If it raises any other exception,
the event handler will be placed in the UNKNOWN state. If it does
not raise any exception, the event is considered successfully
processed. A result handler's return value is ignored. Writing a
result handler is a "in case of emergency break glass" sort of
thing, it is not something to be used for arbitrary business code.
In particular, handlers *must not block* for any appreciable
amount of time.
The standard eventlistener result handler
(supervisor.dispatchers:default_handler) does nothing if it receives an
"OK" and will raise a supervisor.dispatchers.RejectEvent exception if it
receives any other value.
- Supervisord now emits TICK events, which happen every N seconds.
Three types of TICK events are available: TICK_5 (every five
seconds), TICK_60 (every minute), TICK_3600 (every hour). Event
listeners may subscribe to one of these types of events to perform
every-so-often processing. TICK events are subtypes of the EVENT
type.
- Get rid of OSX platform-specific memory monitor and replace with
memmon.py, which works on both Linux and Mac OS. This script is
now a console script named "memmon".
- Allow "web handler" (the handler which receives http requests from
browsers visiting the web UI of supervisor) to deal with POST requests.
- RPC interface methods stopProcess(), stopProcessGroup(), and
stopAllProcesses() now take an optional "wait" argument that defaults
to True for parity with the start methods.
3.0a3 (2007-10-02)
------------------
- Supervisorctl now reports a better error message when the main supervisor
XML-RPC namespace is not registered. Thanks to Mike Orr for reporting
this. (Mike Naberezny)
- Create ``scripts`` directory within supervisor package, move
``pidproxy.py`` there, and place sample event listener and comm event
programs within the directory.
- When an event notification is buffered (either because a listener rejected
it or because all listeners were busy when we attempted to send it
originally), we now rebuffer it in a way that will result in it being
retried earlier than it used to be.
- When a listener process exits (unexpectedly) before transitioning from the
BUSY state, rebuffer the event that was being processed.
- supervisorctl ``tail`` command now accepts a trailing specifier: ``stderr``
or ``stdout``, which respectively, allow a user to tail the stderr or
stdout of the named process. When this specifier is not provided, tail
defaults to stdout.
- supervisor ``clear`` command now clears both stderr and stdout logs for the
given process.
- When a process encounters a spawn error as a result of a failed execve or
when it cannot setuid to a given uid, it now puts this info into the
process' stderr log rather than its stdout log.
- The event listener protocol header now contains the ``server`` identifier,
the ``pool`` that the event emanated from, and the ``poolserial`` as well
as the values it previously contained (version, event name, serial, and
length). The server identifier is taken from the config file options value
``identifier``, the ``pool`` value is the name of the listener pool that
this event emanates from, and the ``poolserial`` is a serial number
assigned to the event local to the pool that is processing it.
- The event listener protocol header is now a sequence of key-value
pairs rather than a list of positional values. Previously, a
representative header looked like::
SUPERVISOR3.0 PROCESS_COMMUNICATION_STDOUT 30 22\n
Now it looks like::
ver:3.0 server:supervisor serial:21 ...
- Specific event payload serializations have changed. All event
types that deal with processes now include the pid of the process
that the event is describing. In event serialization "header"
values, we've removed the space between the header name and the
value and headers are now separated by a space instead of a line
feed. The names of keys in all event types have had underscores
removed.
- Abandon the use of the Python stdlib ``logging`` module for speed
and cleanliness purposes. We've rolled our own.
- Fix crash on start if AUTO logging is used with a max_bytes of
zero for a process.
- Improve process communication event performance.
- The process config parameters ``stdout_capturefile`` and
``stderr_capturefile`` are no longer valid. They have been replaced with
the ``stdout_capture_maxbytes`` and ``stderr_capture_maxbytes`` parameters,
which are meant to be suffix-multiplied integers. They both default to
zero. When they are zero, process communication event capturing is not
performed. When either is nonzero, the value represents the maximum number
of bytes that will be captured between process event start and end tags.
This change was to support the fact that we no longer keep capture data in
a separate file, we just use a FIFO in RAM to maintain capture info. For
users whom don't care about process communication events, or whom haven't
changed the defaults for ``stdout_capturefile`` or ``stderr_capturefile``,
they needn't do anything to their configurations to deal with this change.
- Log message levels have been normalized. In particular, process
stdin/stdout is now logged at ``debug`` level rather than at ``trace``
level (``trace`` level is now reserved for output useful typically for
debugging supervisor itself). See "Supervisor Log Levels" in the
documentation for more info.
- When an event is rebuffered (because all listeners are busy or a
listener rejected the event), the rebuffered event is now inserted
in the head of the listener event queue. This doesn't guarantee
event emission in natural ordering, because if a listener rejects
an event or dies while it's processing an event, it can take an
arbitrary amount of time for the event to be rebuffered, and other
events may be processed in the meantime. But if pool listeners
never reject an event or don't die while processing an event, this
guarantees that events will be emitted in the order that they were
received because if all listeners are busy, the rebuffered event
will be tried again "first" on the next go-around.
- Removed EVENT_BUFFER_OVERFLOW event type.
- The supervisorctl xmlrpc proxy can now communicate with
supervisord using a persistent HTTP connection.
- A new module "supervisor.childutils" was added. This module
provides utilities for Python scripts which act as children of
supervisord. Most notably, it contains an API method
"getRPCInterface" allows you to obtain an xmlrpxlib ServerProxy
that is willing to communicate with the parent supervisor. It
also contains utility functions that allow for parsing of
supervisor event listener protocol headers. A pair of scripts
(loop_eventgen.py and loop_listener.py) were added to the script
directory that serve as examples about how to use the childutils
module.
- A new envvar is added to child process environments:
SUPERVISOR_SERVER_URL. This contains the server URL for the
supervisord running the child.
- An ``OK`` URL was added at ``/ok.html`` which just returns the string
``OK`` (can be used for up checks or speed checks via plain-old-HTTP).
- An additional command-line option ``--profile_options`` is accepted
by the supervisord script for developer use::
supervisord -n -c sample.conf --profile_options=cumulative,calls
The values are sort_stats options that can be passed to the
standard Python profiler's PStats sort_stats method.
When you exit supervisor, it will print Python profiling output to
stdout.
- If cElementTree is installed in the Python used to invoke
supervisor, an alternate (faster, by about 2X) XML parser will be
used to parse XML-RPC request bodies. cElementTree was added as
an "extras_require" option in setup.py.
- Added the ability to start, stop, and restart process groups to
supervisorctl. To start a group, use ``start groupname:*``. To start
multiple groups, use ``start groupname1:* groupname2:*``. Equivalent
commands work for "stop" and "restart". You can mix and match short
processnames, fullly-specified group:process names, and groupsplats on the
same line for any of these commands.
- Added ``directory`` option to process config. If you set this
option, supervisor will chdir to this directory before executing
the child program (and thus it will be the child's cwd).
- Added ``umask`` option to process config. If you set this option,
supervisor will set the umask of the child program. (Thanks to
Ian Bicking for the suggestion).
- A pair of scripts ``osx_memmon_eventgen.py`` and `osx_memmon_listener.py``