]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Retrieve volume in update_migrated_volume
authorlisali <xiaoyan.li@intel.com>
Sun, 6 Sep 2015 06:05:22 +0000 (06:05 +0000)
committerLisaLi <xiaoyan.li@intel.com>
Fri, 11 Sep 2015 06:36:20 +0000 (06:36 +0000)
commit647cff38fe412d2a31c6ed3f77cc1da1e73a8424
treeec6ff8fe73e674fff66dec3c924dbed73baef451
parent31ff5b05879fcec5124291816077660aa46f30f5
Retrieve volume in update_migrated_volume

When transferring db volume module through RPC call, it becomes
dict objects during RPC call. The attributes/properties
of the type can't be used.
As a result, to get volume['name'] raises KeyError.

The issue is fixed by retrieving volume from db.
Using volume version object will fix everything but it is
too late in Liberty. To keep code consistency, db.get_volume
is used in the fix.

Change-Id: I5ac7f083d5b4b7490347069728eb4b938c20885c
Closes-bug: 1491210
cinder/tests/unit/test_volume.py
cinder/volume/manager.py