Issue #607
closedserver/config.py reads server.conf when the module is loaded.
Description
server/config.py reads server.conf when the module is loaded.
+ This bug was cloned from Bugzilla Bug #1160369 +
Related issues
Updated by bmbouter almost 10 years ago
- Blocks Task #413: Our unit tests require read permissions on server.conf added
Updated by bmbouter almost 10 years ago
- Severity changed from Medium to 2. Medium
Updated by rbarlow over 9 years ago
- Priority changed from Normal to High
Updated by semyers about 9 years ago
- Status changed from NEW to POST
- Assignee set to semyers
I thought I'd assigned this to myself, but apparently not. :(
Apologies for going straight from NEW to POST, and here's the PR:
https://github.com/pulp/pulp/pull/2176
Updated by semyers about 9 years ago
The referenced PR does technically fix the issue reported here, but in testing to see if this fix helps out #413, which is why this was made in the first place, new problems were revealed. I'm adding and adjusting tests to capture those failures, then fixing them.
Updated by semyers about 9 years ago
- Status changed from POST to ASSIGNED
I've reached the "but at what cost?" phase...
All core unit tests are passing with an unreadable server conf, but I'd like come back to it after a night's sleep and make sure my measures for making this possible are reasonable. I also need to write some docstrings, and then I'll get this all pushed up to the previously mentioned PR.
Updated by semyers about 9 years ago
- Status changed from ASSIGNED to POST
I did indeed find opportunities to clean things up a little bit and make some improvements. The PR has been updated with those changes.
Added by semyers about 9 years ago
Added by semyers about 9 years ago
Revision 5b516218 | View on GitHub
server.conf is lazily loaded
pulp.server.config would load /etc/pulp/server.conf unconditionally at import time. Converting this to lazily loading the config file allows for the config object to be instantiated without immediately trying to read the conf. This also allows changing the config files before loading them, which makes pulp.server.config testable.
fixes #607
Updated by semyers about 9 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|5b5162180fd88d55361d054ed861a3c99a616493.
Updated by semyers about 9 years ago
- Related to Issue #1409: config loading methods are calling in the wrong order added
Updated by dkliban@redhat.com almost 9 years ago
- Status changed from MODIFIED to 5
Updated by dkliban@redhat.com almost 9 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
server.conf is lazily loaded
pulp.server.config would load /etc/pulp/server.conf unconditionally at import time. Converting this to lazily loading the config file allows for the config object to be instantiated without immediately trying to read the conf. This also allows changing the config files before loading them, which makes pulp.server.config testable.
fixes #607