Hi, On Tue, Feb 04, 2014 at 12:36:16PM -0500, Miguel Angel Ajo Pelayo wrote: > > > Hi Ralf, I see we're on the same boat for this. > > It seems that a database migration introduces complications > for future upgrades. It's not an easy path. > > My aim when I started this backport was trying to scale out > neutron-server, starting several ones together. But I'm afraid > we would find more bugs like this requiring db migrations. > > Have you actually tested running multiple servers in icehouse?, > I just didn't have the time, but it's in my roadmap. I actually ran into the bug in a single server setup. But that seems to happen pretty rarely.
> If that fixes the problem, may be some heavier approach (like > table locking) could be used in the backport, without introducing > a new/conflicting migration. Hm, there seems to be no clean way to do table locking in sqlalchemy. At least I didn't find one. > About the DB migration backport problem, the actual problem is: [..] > 1st step) fix E in icehouse to skip the real unique constraint insertion if > it does already exist: > > havana | icehouse > | > A<-B<-C<-|--D<-*E*<-F > > 2nd step) insert E2 in the middle of B and C to keep the icehouse first > reference happy: > > havana | icehouse > | > A<-B<-E<-C<-|--D<-*E*<-F > > What do you think? I agree, that would likely be the right fix. But as it seems there are some (more or less) strict rules about stable backports of migrations (which I understand as it can get really tricky). So a solution that doesn't require them would probabyl be preferable. > ----- Original Message ----- > > From: "Ralf Haferkamp" <rha...@suse.de> > > To: openstack-dev@lists.openstack.org > > Sent: Tuesday, February 4, 2014 4:02:36 PM > > Subject: [openstack-dev] [Neutron] backporting database migrations to > > stable/havana > > > > Hi, > > > > I am currently trying to backport the fix for > > https://launchpad.net/bugs/1254246 to stable/havana. The current state of > > that > > is here: https://review.openstack.org/#/c/68929/ > > > > However, the fix requires a database migration to be applied (to add a > > unique > > constraint to the agents table). And the current fix linked above will AFAIK > > break havana->icehouse migrations. So I wonder what would be the correct way > > to > > do backport database migrations in neutron using alembic? Is there even a > > correct way, or are backports of database migrations a no go? > > > > -- > > regards, > > Ralf -- Ralf _______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev