]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Remove logging statements from migrations
authorJohn Griffith <john.griffith8@gmail.com>
Mon, 15 Jun 2015 21:23:39 +0000 (15:23 -0600)
committerJohn Griffith <john.griffith8@gmail.com>
Mon, 20 Jul 2015 20:46:15 +0000 (14:46 -0600)
commit82e87b5080fa539c3fe3f58b59dc7db0678ca3a3
tree3fcc608425d3129417b56ccc614151005c9bccc2
parentdb0cca532b774970b2fa15776ab935b276c40838
Remove logging statements from migrations

One of the things that I believe is causing problems with the move to
ostestr and concurrency in unit test run is the copious amounts of
logging that is coming from the db migrations.  In most cases much of
this logging doesn't really seem all that useful, a debug or info log
stating a migration failed, followed by a raise which should generate
a stack trace with the error anyway, seems we could easily do without
this.

Also the "performing migration xxxx/completing migration xxxx" doesn't
seem overly helpful either.  Keep in mind that the migration engine
does some amount of logging anyway.

In addition, catching the exceptions and logging them isn't overly
beneficial or needed either.  When calling migrate from cinder-manage
if one of the migrations raises an exception that will be propogated
up to cinder-manage and displayed.  In other words all of the info is
already available, so there's no need to put it here.

Finally, if you take a look in general most migrations in other
projects don't LOG every thing for the same reasons.

So this patch removes logging statement from the migrations themeselves.

Change-Id: I285df7061c79c79e217cccb2fe387437c20ff746
25 files changed:
cinder/db/sqlalchemy/migrate_repo/versions/001_cinder_init.py
cinder/db/sqlalchemy/migrate_repo/versions/002_quota_class.py
cinder/db/sqlalchemy/migrate_repo/versions/003_glance_metadata.py
cinder/db/sqlalchemy/migrate_repo/versions/004_volume_type_to_uuid.py
cinder/db/sqlalchemy/migrate_repo/versions/005_add_source_volume_column.py
cinder/db/sqlalchemy/migrate_repo/versions/008_add_backup.py
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/015_drop_migrations_table.py
cinder/db/sqlalchemy/migrate_repo/versions/016_drop_sm_tables.py
cinder/db/sqlalchemy/migrate_repo/versions/017_add_encryption_information.py
cinder/db/sqlalchemy/migrate_repo/versions/018_add_qos_specs.py
cinder/db/sqlalchemy/migrate_repo/versions/020_add_volume_admin_metadata_table.py
cinder/db/sqlalchemy/migrate_repo/versions/021_add_default_quota_class.py
cinder/db/sqlalchemy/migrate_repo/versions/023_add_expire_reservations_index.py
cinder/db/sqlalchemy/migrate_repo/versions/024_add_replication_support.py
cinder/db/sqlalchemy/migrate_repo/versions/025_add_consistencygroup.py
cinder/db/sqlalchemy/migrate_repo/versions/026_add_consistencygroup_quota_class.py
cinder/db/sqlalchemy/migrate_repo/versions/032_add_volume_type_projects.py
cinder/db/sqlalchemy/migrate_repo/versions/037_add_cgsnapshot_id_column_to_consistencygroups.py
cinder/db/sqlalchemy/migrate_repo/versions/038_add_driver_initiator_data_table.py
cinder/db/sqlalchemy/migrate_repo/versions/039_add_parent_id_to_backups.py
cinder/db/sqlalchemy/migrate_repo/versions/040_add_volume_attachment.py
cinder/db/sqlalchemy/migrate_repo/versions/041_add_modified_at_column_to_service.py
cinder/db/sqlalchemy/migrate_repo/versions/047_add_per_volume_quota.py