Project

Profile

Help

Issue #607

closed

server/config.py reads server.conf when the module is loaded.

Added by jortel@redhat.com over 7 years ago. Updated over 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.5
Platform Release:
2.8.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

server/config.py reads server.conf when the module is loaded.

+ This bug was cloned from Bugzilla Bug #1160369 +


Related issues

Related to Pulp - Issue #1409: config loading methods are calling in the wrong orderCLOSED - CURRENTRELEASEsemyersActions
Blocks Pulp - Task #413: Our unit tests require read permissions on server.confCLOSED - CURRENTRELEASEsemyers

Actions
Actions #1

Updated by bmbouter over 7 years ago

  • Blocks Task #413: Our unit tests require read permissions on server.conf added
Actions #2

Updated by bmbouter over 7 years ago

  • Severity changed from Medium to 2. Medium
Actions #3

Updated by rbarlow over 7 years ago

  • 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.

Actions #4

Updated by semyers almost 7 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

Actions #5

Updated by semyers almost 7 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.

Actions #6

Updated by semyers almost 7 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.

Actions #7

Updated by semyers almost 7 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 almost 7 years ago

Revision 5b516218

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

Added by semyers almost 7 years ago

Revision 5b516218

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

Actions #8

Updated by semyers almost 7 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #9

Updated by semyers almost 7 years ago

  • Platform Release set to 2.8.0
Actions #10

Updated by semyers almost 7 years ago

  • Related to Issue #1409: config loading methods are calling in the wrong order added
Actions #11

Updated by dkliban@redhat.com over 6 years ago

  • Status changed from MODIFIED to 5
Actions #12

Updated by dkliban@redhat.com over 6 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #13

Updated by bmbouter over 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF