Skip to content

Commit 15c5d6f

Browse files
committed
Add /etc/supervisor/supervisord.conf to the search paths.
Closes #414
1 parent c888d0b commit 15c5d6f

File tree

4 files changed

+21
-10
lines changed

4 files changed

+21
-10
lines changed

CHANGES.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
3.3.0 (Next 3.x Release)
22
------------------------
33

4+
- ``/etc/supervisor/supervisord.conf`` has been added to the config file search
5+
paths. Many versions of Supervisor packaged for Debian and Ubuntu have
6+
included a patch that added this path. This difference was reported in a
7+
number of tickets as a source of confusion and upgrade difficulties, so the
8+
path has been added. Patch by Kelvin Wong.
9+
410
- Glob patterns in the ``include`` section now support the ``host_node_name``
511
expansion. Patch by Paul Lockaby.
612

docs/configuration.rst

Lines changed: 5 additions & 5 deletions
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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ def __init__(self, require_configfile=True):
100100
os.path.join(here, 'supervisord.conf'),
101101
'supervisord.conf',
102102
'etc/supervisord.conf',
103-
'/etc/supervisord.conf']
103+
'/etc/supervisord.conf',
104+
'/etc/supervisor/supervisord.conf',
105+
]
104106
self.searchpaths = searchpaths
105107

106108
self.environ_expansions = {}

supervisor/tests/test_options.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,13 @@ def test_add_duplicate_long_option_key(self):
159159

160160
def test_searchpaths(self):
161161
options = self._makeOptions()
162-
self.assertEqual(len(options.searchpaths), 5)
163-
self.assertTrue('supervisord.conf' in options.searchpaths)
164-
self.assertTrue('etc/supervisord.conf' in options.searchpaths)
165-
self.assertTrue('/etc/supervisord.conf' in options.searchpaths)
162+
self.assertEqual(len(options.searchpaths), 6)
163+
self.assertEqual(options.searchpaths[-4:], [
164+
'supervisord.conf',
165+
'etc/supervisord.conf',
166+
'/etc/supervisord.conf',
167+
'/etc/supervisor/supervisord.conf',
168+
])
166169

167170
def test_options_and_args_order(self):
168171
# Only config file exists

0 commit comments

Comments
 (0)