]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Remove the jointly loaded model in finish_volume_migration
authorVincent Hou <sbhou@cn.ibm.com>
Wed, 14 Oct 2015 02:35:13 +0000 (19:35 -0700)
committerVincent Hou <sbhou@cn.ibm.com>
Thu, 22 Oct 2015 05:52:35 +0000 (22:52 -0700)
commit79414d17d84efe7434d70a4ae1436b45cfc09421
treeceee299bf9693bcb57ec8704e22a03b98a747c93
parent944763920decc06f324d54db28e056485cc26507
Remove the jointly loaded model in finish_volume_migration

After a successful volume migration, the source volume and the
destination volume need to swap the data in the models in
finish_volume_migration. It is sufficient to load the volume
model only and there is no need to load other models, like
volume type, metadata, consistency group, etc. If we load
these additional models, it will lead to NULL key error, when
either source or destination model has a NULL key pointer.

Change-Id: I04ad0739387d602719591680854e6655cc87f9ab
Closes-Bug: #1505572
cinder/db/sqlalchemy/api.py
cinder/tests/unit/db/test_finish_migration.py