Upgrading Supervisor 2 to 3¶
The following is true when upgrading an installation from Supervisor 2.X to Supervisor 3.X:
In
[program:x]sections, the keyslogfile,logfile_backups,logfile_maxbytes,log_stderrandlog_stdoutare no longer valid. Supervisor2 logged both stderr and stdout to a single log file. Supervisor 3 logs stderr and stdout to separate log files. You’ll need to renamelogfiletostdout_logfile,logfile_backupstostdout_logfile_backups, andlogfile_maxbytestostdout_logfile_maxbytesat the very least to preserve your configuration. If you created program sections wherelog_stderrwas true, to preserve the behavior of sending stderr output to the stdout log, use theredirect_stderrboolean in the program section instead.The supervisor configuration file must include the following section verbatim for the XML-RPC interface (and thus the web interface and supervisorctl) to work properly:
[rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
The semantics of the
autorestartparameter within[program:x]sections has changed. This parameter used to accept onlytrueorfalse. It now accepts an additional value,unexpected, which indicates that the process should restart from theEXITEDstate only if its exit code does not match any of those represented by theexitcodeparameter in the process’ configuration (implying a process crash). In addition, the default forautorestartis nowunexpected(it used to betrue, which meant restart unconditionally).We now allow supervisord to listen on both a UNIX domain socket and an inet socket instead of making listening on one mutually exclusive with listening on the other. As a result, the options
http_port,http_username,http_password,sockchmodandsockchownare no longer part of the[supervisord]section configuration. These have been supplanted by two other sections:[unix_http_server]and[inet_http_server]. You’ll need to insert one or the other (depending on whether you want to listen on a UNIX domain socket or a TCP socket respectively) or both into yoursupervisord.conffile. These sections have their own options (where applicable) forport,username,password,chmod, andchown.All supervisord command-line options related to
http_port,http_username,http_password,sockchmodandsockchownhave been removed (see above point for rationale).The option that used to be
sockchownwithin the[supervisord]section (and is now namedchownwithin the[unix_http_server]section) used to accept a dot-separated (user.group) value. The separator now must be a colon, e.g.user:group. Unices allow for dots in usernames, so this change is a bugfix.