Translations export script failing.

Bug #707741 reported by Henning Eggers
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
William Grant

Bug Description

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

2011-01-24 00:32:20 ERROR Unhandled exception
 -> http://launchpadlibrarian.net/....txt (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

Revision history for this message
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.

Revision history for this message
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?

Revision history for this message
Данило Шеган (danilo) wrote :

The way to QA this is to just go and request a single export from eg. https://translations.launchpad.net/openobject-addons/trunk/+pots/account-accountant/sr/+export

The script to run is cronscripts/rosetta-export-queue.py, 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)
Changed in launchpad:
assignee: nobody → Launchpad Green Squad (green-squad)
William Grant (wgrant)
Changed in launchpad:
assignee: Launchpad Green Squad (green-squad) → William Grant (wgrant)
William Grant (wgrant)
Changed in launchpad:
status: Triaged → In Progress
Revision history for this message
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)
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.