]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Replace glance_metadata check with bootable column.
authorJohn Griffith <john.griffith@solidfire.com>
Wed, 19 Jun 2013 05:22:48 +0000 (23:22 -0600)
committerJohn Griffith <john.griffith@solidfire.com>
Tue, 25 Jun 2013 19:13:12 +0000 (13:13 -0600)
commitc8f814569d07544734f10f134e146ce981639e07
tree8d5f29e43235e35d09af56e79b0ba2b86e78d085
parent6f723a6b26090f3a04bc45d57df5997e20849914
Replace glance_metadata check with bootable column.

This patch adds a column to indicate if a volume is bootable or not.

Cinder API V1 was using get.volume_glance_metadata to determine
if a volume was bootable for translate_view.

This is fine until you put a heavy load on the system and things
can fall apart, particularly the backref of the glance meta is no longer
available and the call blows up.  Also this results in a bit of extra
unnecessary data being passed around with every create and get call.
This is especially an issue when creating hundreds or thousands of volumes.
Even better we can now reliably create thousands of volumes.

Fixes bug: 1192390

Change-Id: Idd47a0a8069ee905b81c7aae562b82767ad91930
cinder/api/v1/volumes.py
cinder/db/sqlalchemy/migrate_repo/versions/011_add_bootable_column.py [new file with mode: 0644]
cinder/db/sqlalchemy/migrate_repo/versions/011_sqlite_downgrade.sql [new file with mode: 0644]
cinder/db/sqlalchemy/models.py
cinder/tests/api/v1/test_volumes.py
cinder/tests/api/v2/stubs.py
cinder/tests/fake_flags.py
cinder/tests/test_migrations.py
cinder/volume/api.py
cinder/volume/manager.py