Skip to content

Commit 3ed820a

Browse files
committed
Add /etc/supervisor/supervisord.conf to the search paths.
Closes #414
1 parent bbdc919 commit 3ed820a

File tree

4 files changed

+21
-10
lines changed

4 files changed

+21
-10
lines changed

CHANGES.txt

+6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131
- Files included via the ``[include]`` section are now logged at the ``INFO``
3232
level instead of ``WARN``. Patch by Daniel Hahler.
3333

34+
- ``/etc/supervisor/supervisord.conf`` has been added to the config file search
35+
paths. Many versions of Supervisor packaged for Debian and Ubuntu have
36+
included a patch that added this path. This difference was reported in a
37+
number of tickets as a source of confusion and upgrade difficulties, so the
38+
path has been added. Patch by Kelvin Wong.
39+
3440
3.2.3 (2016-03-19)
3541
------------------
3642

docs/configuration.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ file it finds.
1616

1717
#. :file:`/etc/supervisord.conf`
1818

19+
#. :file:`/etc/supervisor/supervisord.conf` (since Supervisor 3.3.0)
20+
1921
#. :file:`../etc/supervisord.conf` (Relative to the executable)
2022

2123
#. :file:`../supervisord.conf` (Relative to the executable)
2224

2325
.. note::
2426

25-
Some distributions have packaged Supervisor with their own
26-
customizations. These modified versions of Supervisor may load the
27-
configuration file from locations other than those described here.
28-
Notably, Ubuntu packages have been found that use
29-
``/etc/supervisor/supervisord.conf``.
27+
Many versions of Supervisor packaged for Debian and Ubuntu included a patch
28+
that added ``/etc/supervisor/supervisord.conf`` to the search paths. The
29+
first PyPI package of Supervisor to include it was Supervisor 3.3.0.
3030

3131
File Format
3232
-----------

supervisor/options.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ def __init__(self, require_configfile=True):
108108
os.path.join(here, 'supervisord.conf'),
109109
'supervisord.conf',
110110
'etc/supervisord.conf',
111-
'/etc/supervisord.conf']
111+
'/etc/supervisord.conf',
112+
'/etc/supervisor/supervisord.conf',
113+
]
112114
self.searchpaths = searchpaths
113115

114116
self.environ_expansions = {}

supervisor/tests/test_options.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,13 @@ def test_add_duplicate_long_option_key(self):
161161

162162
def test_searchpaths(self):
163163
options = self._makeOptions()
164-
self.assertEqual(len(options.searchpaths), 5)
165-
self.assertTrue('supervisord.conf' in options.searchpaths)
166-
self.assertTrue('etc/supervisord.conf' in options.searchpaths)
167-
self.assertTrue('/etc/supervisord.conf' in options.searchpaths)
164+
self.assertEqual(len(options.searchpaths), 6)
165+
self.assertEqual(options.searchpaths[-4:], [
166+
'supervisord.conf',
167+
'etc/supervisord.conf',
168+
'/etc/supervisord.conf',
169+
'/etc/supervisor/supervisord.conf',
170+
])
168171

169172
def test_options_and_args_order(self):
170173
# Only config file exists

0 commit comments

Comments
 (0)