Issue #607
closed
server/config.py reads server.conf when the module is loaded.
Status:
CLOSED - CURRENTRELEASE
Description
server/config.py reads server.conf when the module is loaded.
+ This bug was cloned from Bugzilla Bug #1160369 +
- Blocks Task #413: Our unit tests require read permissions on server.conf added
- Severity changed from Medium to 2. Medium
- Priority changed from Normal to High
Since this one is related to #131, I propose that we raise the priority. Fixing the DB connecting will help, but ultimately the real problem is that Pulp performs side effects when modules are imported. This bug is just another manifestation of that problem, like #131.
- Status changed from NEW to POST
- Assignee set to semyers
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.
- 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.
- 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.
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
- Platform Release set to 2.8.0
- Related to Issue #1409: config loading methods are calling in the wrong order added
- Status changed from MODIFIED to 5
- Status changed from 5 to CLOSED - CURRENTRELEASE
Also available in: Atom
PDF
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