authdb replication set sequence values not being restored on staging

Bug #504807 reported by Tom Haddon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Stuart Bishop

Bug Description

When we restore the authdb replication set onto staging, we are not resetting the sequences to the correct values. This makes things explode.

Related branches

Revision history for this message
Tom Haddon (mthaddon) wrote :

If this is going to stay like this for some period of time, please let us know, so we can run this automatically as part of the staging restore.

Revision history for this message
Tom Haddon (mthaddon) wrote :

Ditto for accountpassword.

Changed in launchpad:
importance: Undecided → Medium
Curtis Hovey (sinzui)
affects: launchpad → launchpad-foundations
Changed in launchpad-foundations:
importance: Medium → High
status: New → Triaged
Revision history for this message
Tom Haddon (mthaddon) wrote :

Looks like bug 502939 may be related, fwiw

Revision history for this message
Stuart Bishop (stub) wrote :

This would be a duplicate of Bug #502939 except for your comment about AccountPassword. I don't know what that means, and if that isn't being restored properly then we have a new and different problem.

Revision history for this message
Stuart Bishop (stub) wrote :

oic.

Data for tables in the authdb replication set is restored from a slave dump, but we are not resetting the sequence values for any serial columns. This will make things explode.

summary: - Staging DB imports don't included data needed for SSO service
+ authdb replication set sequence values not being restored on staging
description: updated
Changed in launchpad-foundations:
assignee: nobody → Stuart Bishop (stub)
Revision history for this message
Stuart Bishop (stub) wrote :

I can't see how my theory is possible now - sequence values and data are being restored from the same dump.

I think I need to inspect the database after a restore, before any repair is made.

Revision history for this message
Tom Haddon (mthaddon) wrote : Re: [Bug 504807] Re: authdb replication set sequence values not being restored on staging

On Tue, 2010-01-12 at 12:06 +0000, Stuart Bishop wrote:
> I can't see how my theory is possible now - sequence values and data are
> being restored from the same dump.
>
> I think I need to inspect the database after a restore, before any
> repair is made.

I've had to fix this again just before you posted this comment. Not sure
if it helps at all, but here's the psql session history:

https://pastebin.canonical.com/26434/

Revision history for this message
Stuart Bishop (stub) wrote :

That helps. The sequence values are not being restored at all. I'll trace this through.

Stuart Bishop (stub)
Changed in launchpad-foundations:
milestone: none → 10.01
Stuart Bishop (stub)
Changed in launchpad-foundations:
status: Triaged → In Progress
Stuart Bishop (stub)
Changed in launchpad-foundations:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in launchpad-foundations:
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.