usage of volume objects break cinder as glance backend unit tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Ryan McNair |
Bug Description
While working on bug #1525452, I noticed that the code in manager:
The following tests make there way into the _clone_iamge_volume call, however there's a number of fields that aren't set properly in the test. It appears these fields are being populated somewhere by a direct db.update call, however this results in circumventing the object create and thus we don't have valid fields when we try and create the object itself. I'm not sure if/how this impacts the actual code but it breaks the following unit tests:
cinder.
cinder.
These tests fail with a KeyError and an incorrect assertion because the _clone_image_volume fails when it tries to create the Volume object due to a number of attributes not being specified or specified incorrectly, including at least (maybe others):
availability_
For now I'm proposing a skip of these tests, as I've spent a bit of time and haven't been able to unravel the issue. I'd prefer to get the caching issue fixed properly and submitted and get some help figuring out the object issues.
This also points out that we seem to have a number of places circumventing the new object implementation and we should probably get that all fixed up quickly.
Additional note:
I believe the case that's broken here is upload volume to image, IFF using Cinder as a backend for Glance. The normal upload volume to image case should work still.