upgrading.rst 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Upgrading Supervisor 2 to 3
  2. ===========================
  3. The following is true when upgrading an installation from Supervisor
  4. 2.X to Supervisor 3.X:
  5. #. In ``[program:x]`` sections, the keys ``logfile``,
  6. ``logfile_backups``, ``logfile_maxbytes``, ``log_stderr`` and
  7. ``log_stdout`` are no longer valid. Supervisor2 logged both
  8. stderr and stdout to a single log file. Supervisor 3 logs stderr
  9. and stdout to separate log files. You'll need to rename
  10. ``logfile`` to ``stdout_logfile``, ``logfile_backups`` to
  11. ``stdout_logfile_backups``, and ``logfile_maxbytes`` to
  12. ``stdout_logfile_maxbytes`` at the very least to preserve your
  13. configuration. If you created program sections where
  14. ``log_stderr`` was true, to preserve the behavior of sending
  15. stderr output to the stdout log, use the ``redirect_stderr``
  16. boolean in the program section instead.
  17. #. The supervisor configuration file must include the following
  18. section verbatim for the XML-RPC interface (and thus the web
  19. interface and :program:`supervisorctl`) to work properly:
  20. .. code-block:: ini
  21. [rpcinterface:supervisor]
  22. supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
  23. #. The semantics of the ``autorestart`` parameter within
  24. ``[program:x]`` sections has changed. This parameter used to
  25. accept only ``true`` or ``false``. It now accepts an additional
  26. value, ``unexpected``, which indicates that the process should
  27. restart from the ``EXITED`` state only if its exit code does not
  28. match any of those represented by the ``exitcode`` parameter in
  29. the process' configuration (implying a process crash). In
  30. addition, the default for ``autorestart`` is now ``unexpected``
  31. (it used to be ``true``, which meant restart unconditionally).
  32. #. We now allow :program:`supervisord` to listen on both a UNIX
  33. domain socket and an inet socket instead of making listening on
  34. one mutually exclusive with listening on the other. As a result,
  35. the options ``http_port``, ``http_username``, ``http_password``,
  36. ``sockchmod`` and ``sockchown`` are no longer part of
  37. the ``[supervisord]`` section configuration. These have been
  38. supplanted by two other sections: ``[unix_http_server]`` and
  39. ``[inet_http_server]``. You'll need to insert one or the other
  40. (depending on whether you want to listen on a UNIX domain socket
  41. or a TCP socket respectively) or both into your
  42. :file:`supervisord.conf` file. These sections have their own
  43. options (where applicable) for ``port``, ``username``,
  44. ``password``, ``chmod``, and ``chown``.
  45. #. All supervisord command-line options related to ``http_port``,
  46. ``http_username``, ``http_password``, ``sockchmod`` and
  47. ``sockchown`` have been removed (see above point for rationale).
  48. #. The option that used to be ``sockchown`` within the
  49. ``[supervisord]`` section (and is now named ``chown`` within the
  50. ``[unix_http_server]`` section) used to accept a dot-separated
  51. (``user.group``) value. The separator now must be a
  52. colon, e.g. ``user:group``. Unices allow for dots in
  53. usernames, so this change is a bugfix.