From: Rushi Agrawal Date: Tue, 26 Nov 2013 06:18:38 +0000 (+0530) Subject: Fix suppressed exceptions for migration downgrade X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=3ddf4511596b2fcfc4ec134cd9edaeaba823e42b;p=openstack-build%2Fcinder-build.git Fix suppressed exceptions for migration downgrade 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 --- diff --git a/cinder/db/sqlalchemy/migrate_repo/versions/009_add_snapshot_metadata_table.py b/cinder/db/sqlalchemy/migrate_repo/versions/009_add_snapshot_metadata_table.py index 3ccd79a23..5b4a9f5e8 100644 --- a/cinder/db/sqlalchemy/migrate_repo/versions/009_add_snapshot_metadata_table.py +++ b/cinder/db/sqlalchemy/migrate_repo/versions/009_add_snapshot_metadata_table.py @@ -58,3 +58,4 @@ def downgrade(migrate_engine): snapshot_metadata.drop() except Exception: LOG.error(_("snapshot_metadata table not dropped")) + raise diff --git a/cinder/db/sqlalchemy/migrate_repo/versions/010_add_transfers_table.py b/cinder/db/sqlalchemy/migrate_repo/versions/010_add_transfers_table.py index 26b4bd6b2..db7fe0e32 100644 --- a/cinder/db/sqlalchemy/migrate_repo/versions/010_add_transfers_table.py +++ b/cinder/db/sqlalchemy/migrate_repo/versions/010_add_transfers_table.py @@ -61,3 +61,4 @@ def downgrade(migrate_engine): transfers.drop() except Exception: LOG.error(_("transfers table not dropped")) + raise diff --git a/cinder/db/sqlalchemy/migrate_repo/versions/020_add_volume_admin_metadata_table.py b/cinder/db/sqlalchemy/migrate_repo/versions/020_add_volume_admin_metadata_table.py index 0cfe9ae42..a226b55df 100644 --- a/cinder/db/sqlalchemy/migrate_repo/versions/020_add_volume_admin_metadata_table.py +++ b/cinder/db/sqlalchemy/migrate_repo/versions/020_add_volume_admin_metadata_table.py @@ -59,3 +59,4 @@ def downgrade(migrate_engine): volume_admin_metadata.drop() except Exception: LOG.error(_("volume_admin_metadata table not dropped")) + raise