Upgrading Supervisor 2 to 3
The following is true when upgrading an installation from Supervisor2.X to Supervisor 3.X:
In [program:x] sections, the keys logfile,logfile_backups, logfile_maxbytes, log_stderr andlog_stdout are no longer valid. Supervisor2 logged bothstderr and stdout to a single log file. Supervisor 3 logs stderrand stdout to separate log files. You’ll need to renamelogfile to stdout_logfile, logfile_backups tostdout_logfile_backups, and logfile_maxbytes tostdout_logfile_maxbytes at the very least to preserve yourconfiguration. If you created program sections wherelog_stderr was true, to preserve the behavior of sendingstderr output to the stdout log, use the redirect_stderrboolean in the program section instead.
The supervisor configuration file must include the followingsection verbatim for the XML-RPC interface (and thus the webinterface and supervisorctl) to work properly:
- [rpcinterface:supervisor]
- supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
The semantics of the autorestart parameter within[program:x] sections has changed. This parameter used toaccept only true or false. It now accepts an additionalvalue, unexpected, which indicates that the process shouldrestart from the EXITED state only if its exit code does notmatch any of those represented by the exitcode parameter inthe process’ configuration (implying a process crash). Inaddition, the default for autorestart is now unexpected(it used to be true, which meant restart unconditionally).
We now allow supervisord to listen on both a UNIXdomain socket and an inet socket instead of making listening onone mutually exclusive with listening on the other. As a result,the options http_port, http_username, http_password,sockchmod and sockchown are no longer part ofthe [supervisord] section configuration. These have beensupplanted 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 socketor a TCP socket respectively) or both into yoursupervisord.conf file. These sections have their ownoptions (where applicable) for port, username,password, chmod, and chown.
All supervisord command-line options related to http_port,http_username, http_password, sockchmod andsockchown have been removed (see above point for rationale).
The option that used to be sockchown within the[supervisord] section (and is now named chown within the[unix_http_server] section) used to accept a dot-separated(user.group) value. The separator now must be acolon, e.g. user:group. Unices allow for dots inusernames, so this change is a bugfix.