]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix suppressed exceptions for migration downgrade
authorRushi Agrawal <rushi.agr@gmail.com>
Tue, 26 Nov 2013 06:18:38 +0000 (11:48 +0530)
committerRushi Agrawal <rushi.agr@gmail.com>
Thu, 28 Nov 2013 07:23:18 +0000 (12:53 +0530)
In SQLAlchemy migration versions 009, 010 and 020, we missed
reraising exceptions while logging errors in case of a downgrade.
We don't want exceptions to pass silently. This patch fixes that.

Closes-bug: 1227881

Change-Id: Id11b1c5d2e26d208e88bb84e5b46c4b7affc3f9f

cinder/db/sqlalchemy/migrate_repo/versions/009_add_snapshot_metadata_table.py
cinder/db/sqlalchemy/migrate_repo/versions/010_add_transfers_table.py
cinder/db/sqlalchemy/migrate_repo/versions/020_add_volume_admin_metadata_table.py

index 3ccd79a232c7ca6bb38c5523d407c18a5ae2292c..5b4a9f5e83ca910ec7aaa0cfbdd4344331165073 100644 (file)
@@ -58,3 +58,4 @@ def downgrade(migrate_engine):
         snapshot_metadata.drop()
     except Exception:
         LOG.error(_("snapshot_metadata table not dropped"))
+        raise
index 26b4bd6b2e233512a1edfca3045753717631f9f7..db7fe0e32a28f0047cea7953c6ff0d06593bcee5 100644 (file)
@@ -61,3 +61,4 @@ def downgrade(migrate_engine):
         transfers.drop()
     except Exception:
         LOG.error(_("transfers table not dropped"))
+        raise
index 0cfe9ae42dd3e39c546957554d216e26ad28f216..a226b55df253db3969acc890d3a415b238e4b201 100644 (file)
@@ -59,3 +59,4 @@ def downgrade(migrate_engine):
         volume_admin_metadata.drop()
     except Exception:
         LOG.error(_("volume_admin_metadata table not dropped"))
+        raise