003_add_disk_format.py: Avoid deadlock in upgrade

The connection used to query existing images needs to be closed
earlier to avoid deadlocking later calls thru sqlalchemy.

Fixes bug 932466

Update: Update my email in Authors

Update: Revert Authors email to original, add git commit email
        to .mailamp.

Change-Id: Ic248fdfe3933437928f0b393d8cde993b96bf2cb
This commit is contained in:
Adam Gandelman 2012-02-14 17:01:59 -08:00
parent bd4d632861
commit b90575d8e9
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
# Format is:
# <preferred e-mail> <other e-mail 1>
# <preferred e-mail> <other e-mail 2>
<adam.gandelman@canonical.com> <adamg@canonical.com>
<brian.waldon@rackspace.com> <bcwaldon@gmail.com>
<corywright@gmail.com> <cory.wright@rackspace.com>
<jsuh@isi.edu> <jsuh@bespin>

View File

@ -105,6 +105,7 @@ def upgrade(migrate_engine):
created_at=record.created_at,
deleted=False,
value=record.type)
conn.close()
disk_format = Column('disk_format', String(20))
disk_format.create(images)
@ -112,7 +113,6 @@ def upgrade(migrate_engine):
container_format.create(images)
images.columns['type'].drop()
conn.close()
def downgrade(migrate_engine):