diff --git a/CHANGES.txt b/CHANGES.txt index 20045c55f..7fb14687b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,12 @@ 3.3.0 (Next 3.x Release) ------------------------ +- ``/etc/supervisor/supervisord.conf`` has been added to the config file search + paths. Many versions of Supervisor packaged for Debian and Ubuntu have + included a patch that added this path. This difference was reported in a + number of tickets as a source of confusion and upgrade difficulties, so the + path has been added. Patch by Kelvin Wong. + - Glob patterns in the ``include`` section now support the ``host_node_name`` expansion. Patch by Paul Lockaby. diff --git a/docs/configuration.rst b/docs/configuration.rst index ac13e2647..b784805a1 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -16,17 +16,17 @@ file it finds. #. :file:`/etc/supervisord.conf` +#. :file:`/etc/supervisor/supervisord.conf` (since Supervisor 3.3.0) + #. :file:`../etc/supervisord.conf` (Relative to the executable) #. :file:`../supervisord.conf` (Relative to the executable) .. note:: - Some distributions have packaged Supervisor with their own - customizations. These modified versions of Supervisor may load the - configuration file from locations other than those described here. - Notably, Ubuntu packages have been found that use - ``/etc/supervisor/supervisord.conf``. + Many versions of Supervisor packaged for Debian and Ubuntu included a patch + that added ``/etc/supervisor/supervisord.conf`` to the search paths. The + first PyPI package of Supervisor to include it was Supervisor 3.3.0. File Format ----------- diff --git a/supervisor/options.py b/supervisor/options.py index 6fce84e59..c04d9a85a 100644 --- a/supervisor/options.py +++ b/supervisor/options.py @@ -100,7 +100,9 @@ def __init__(self, require_configfile=True): os.path.join(here, 'supervisord.conf'), 'supervisord.conf', 'etc/supervisord.conf', - '/etc/supervisord.conf'] + '/etc/supervisord.conf', + '/etc/supervisor/supervisord.conf', + ] self.searchpaths = searchpaths self.environ_expansions = {} diff --git a/supervisor/tests/test_options.py b/supervisor/tests/test_options.py index 4e8da1e24..7333ff9da 100644 --- a/supervisor/tests/test_options.py +++ b/supervisor/tests/test_options.py @@ -159,10 +159,13 @@ def test_add_duplicate_long_option_key(self): def test_searchpaths(self): options = self._makeOptions() - self.assertEqual(len(options.searchpaths), 5) - self.assertTrue('supervisord.conf' in options.searchpaths) - self.assertTrue('etc/supervisord.conf' in options.searchpaths) - self.assertTrue('/etc/supervisord.conf' in options.searchpaths) + self.assertEqual(len(options.searchpaths), 6) + self.assertEqual(options.searchpaths[-4:], [ + 'supervisord.conf', + 'etc/supervisord.conf', + '/etc/supervisord.conf', + '/etc/supervisor/supervisord.conf', + ]) def test_options_and_args_order(self): # Only config file exists