LaunchpadOpenIDStore doesn't support database disconnection

Bug #376207 reported by Francis J. Lacoste
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
James Henstridge

Bug Description

The LaunchpadOpenIDStore store isn't using reconnection code. It's doing operation on the raw cursor, which means that disconnection errors are uncaught and leave the app server stuck because of bug 374909.

OpenIdConsumerStore is also affected.

See OOPS-1228A1097 and the many subsequent InterfaceError: OOPS-1228A1098, OOPS-1228A1099, etc.

Changed in launchpad-foundations:
importance: Undecided → High
milestone: none → 2.2.5
status: New → Triaged
description: updated
tags: added: oops openid
Changed in shipit:
importance: Undecided → High
milestone: none → 2.2.5
status: New → Triaged
description: updated
Revision history for this message
James Henstridge (jamesh) wrote :

I've put together a branch that implements OpenIDStore in terms of Storm, which removes the problem code paths. The branch does not implement nonce handling because that feature is not required by OpenID providers.

That solves the problem for the SSO server, but leaves the openidconsumer code unfixed. It'd be good to see if we can share as much of the implementation as possible. Here's a sketch of a solution:

1. have a base StormOpenIDStore class that is pretty much the same as my current code, but with the nonce handling filled in.

2. rather than referencing the Storm classes representing associations and nonces directly, go through class variables.

3. provide implementations of the association and nonce Storm classes minus the __storm_table__ attributes.

4. the SSO server and shipit could then subclass the association and nonce classes, filling in __storm_table__ with the correct table names, and make a StormOpenIDStore subclass that points at these two Storm classes.

5. Templatise the current tests in my branch so that they can be run against the SSO and shipit specialised OpenIDStores.

Changed in launchpad-foundations:
assignee: nobody → James Henstridge (jamesh)
status: Triaged → In Progress
Revision history for this message
Stuart Bishop (stub) wrote :

A quickfix is available at lp:~stub/launchpad/openidstore-reconnect-quickfix which handles both consumer and provider Stores.

The StormOpenIDStore implementation is likely the better approach, I suspect it will be less fragile in the long term and I can modify it so the underlying database tables match our coding standards.

Revision history for this message
James Henstridge (jamesh) wrote :

I've updated my branch roughly as described above, so it now covers both the provider and consumer stores. The two OpenIDStore implementations share the same set of tests.

Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit

Fixed in devel r8461.

Changed in launchpad-foundations:
status: In Progress → Fix Committed
Revision history for this message
James Henstridge (jamesh) wrote :

The consumer code has also been updated, so this should be fixed for shipit too.

Changed in shipit:
assignee: nobody → James Henstridge (jamesh)
status: Triaged → Fix Committed
Changed in launchpad-foundations:
status: Fix Committed → Fix Released
Changed in shipit:
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.