Translations export script failing.

Bug #707741 reported by Henning Eggers on 2011-01-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
William Grant

Bug Description

From the log (removed part of the launchpadlibrarian url):

2011-01-24 00:32:20 ERROR Unhandled exception
 -> (Server said: 400 Wrong database 'launchpad_prod_2',
should be u'launchpad_prod_3')

That timestamp is the first occurrence and it seems like that was when revision 12248 was deployed. So any revision between 12214 and 12248 may have caused this.

Related branches

Tom Haddon (mthaddon) wrote :

It sounds like it's trying to use the slave database connection for write operations, but it'd be interesting to find out where exactly that error is coming from - I'm not sure if it's from the DB itself, or somewhere in the code that knows it should be talking to a different database. I'm assuming this must be specific to this script rather than a config issue, because otherwise we'd have a lot of other scripts complaining of similar things.

William Grant (wgrant) wrote :

It was r12215. The problematic code is now wrapped in SlaveDatabasePolicy (not SlaveOnlyDatabasePolicy, so it is allowed to use the master when required, so it should work).

Now, the librarian upload protocol checks that the server and client are using the same DB. But FileUploadClient.addFile uses the old SQLObject-compatible cursor() method to determine the database name, which uses the default store, which in this case is the slave, when file creation should obvious use the master.

Perhaps addFile should explicitly use the master?

The way to QA this is to just go and request a single export from eg.

The script to run is cronscripts/, and adding a few -v options should also include the link to the librarian file it produces (though I am not too sure about that). If QAing on staging, one might want to clean up the export queue there first with "DELETE FROM POExportRequest".

tags: added: regression
Curtis Hovey (sinzui) on 2011-01-26
Changed in launchpad:
assignee: nobody → Launchpad Green Squad (green-squad)
William Grant (wgrant) on 2011-01-26
Changed in launchpad:
assignee: Launchpad Green Squad (green-squad) → William Grant (wgrant)
William Grant (wgrant) on 2011-01-26
Changed in launchpad:
status: Triaged → In Progress
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
milestone: none → 11.02
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
William Grant (wgrant) on 2011-01-27
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant) on 2011-01-28
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers