Closed
Bug 700362
Opened 14 years ago
Closed 13 years ago
Enable multidb routing on affiliates
Categories
(Firefox Affiliates Graveyard :: affiliates.mozilla.org, defect)
Firefox Affiliates Graveyard
affiliates.mozilla.org
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: wenzel, Assigned: osmose)
Details
(Whiteboard: [qa-])
Turns out, playdoh shipped with our django multidb router, but did not enable it by default. The chances that it is enabled on affiliates prod are therefore pretty slim.
Please enable the multidb router on stage and prod by making the necessary code and settings changes.
CCing tofumatt: When you land this on funfactory/playdoh, will you link to the commits here, so mkelly knows what to fix? Thanks!
| Reporter | ||
Updated•14 years ago
|
Assignee: nobody → mkelly
Comment 1•14 years ago
|
||
Check out the new setting in https://github.com/mozilla/playdoh/blob/base/settings/local.py-dist#L31
You just need to have slaves defined in your DATABASES dict, then add them to the SLAVE_DATABASES array.
Updated•14 years ago
|
Product: Websites → Firefox Affiliates
| Assignee | ||
Comment 2•13 years ago
|
||
I checked on affiliates-dev, and the SLAVE_DATABASES list is set. I can only assume the same is true for staging and production.
CCing jd in case I'm wrong, but I think this bug is FIXED. :D
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 3•13 years ago
|
||
I am not sure what the question is here. I can tell you that there is a slave database configuration array in the local.py file for stage and prod. However the "SLAVE_DATABASES = ['slave']" option is only set in dev so I am guessing this needs to be changed? Let me know if that is the case and I can take care of it as you like.
| Assignee | ||
Comment 4•13 years ago
|
||
(In reply to Jason Crowe [:jd] from comment #3)
> I am not sure what the question is here. I can tell you that there is a
> slave database configuration array in the local.py file for stage and prod.
> However the "SLAVE_DATABASES = ['slave']" option is only set in dev so I am
> guessing this needs to be changed? Let me know if that is the case and I can
> take care of it as you like.
I believe so. The docs on https://github.com/jbalogh/django-multidb-router say that the slave database aliases need to be specified in the SLAVE_DATABASES setting.
Do you want me to file a specific IT bug for adding this setting to stage and prod? Also, is it possible to check the logs of the slave databases to see if they're being used? I'm curious if we've had them configured all this time without using them, or if there's another configuration we don't know about that's handling this.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 5•13 years ago
|
||
Yes, please file a new bug for tracking, you can assign it to me.
I am somewhat sure that the SLAVE_DATABASES setting is relevant and that you are not using the slave db on stage and prod.
I have removed a bunch of SLAVE_DATABASES settings recently (on request) as it seems to break south migrations (bug in south where it attempts to execute everything on the master then the slave - which fails as the job already replicated to the slave). I was told this is fixed in newer versions of south so perhaps this is not an issue for you.
| Assignee | ||
Comment 6•13 years ago
|
||
Affiliates is on south 0.7.4, the latest is 0.7.6, and the release notes for versions in-between mention nothing about slave or multiple database issues, so I don't think we will run into any issues.
Filed bug 852683 to track adding the setting to stage and prod. Thanks!
| Assignee | ||
Comment 7•13 years ago
|
||
Resolved as per bug 852683.
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Firefox Affiliates → Firefox Affiliates Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•