Comment 2 for bug 1401110

Revision history for this message
Mitsuhiro Tanino (mitsuhiro-tanino) wrote :

I also have same problem now.

I think the root cause of this problem is in tempest test steps.
In the test of test_snapshot_create_with_volume_in_use, these test steps are executed.

(1) Create a server
(2) Create a volume
(3) Attach volume using Cinder "os-attach" API ( instead of using Nova "os-volume_attachments")
(4) Create snapshot for the volume
(5) Error...

In my understanding, "os-attach" only updates some cinder DB entry related to volume attachment and this does not attach a volume to an instance.
#This API is generally called from Nova side after volume attachment is finished.

Therefore, nova does not know the volume after this API is called and there is no block_device_mapping in nova DB.
I confirmed Nova's block_device_mapping DB entry, after "os-attach" API, and there is no volume entry which is created step (2).

In test step (3), "self.volumes_client.attach_volume" is called now. This calls cinder client API.
But I think right test is calling "self.servers_client.attach_volume". This call Nova's volume attachment API.

I succeeded this test using "self.servers_client.attach_volume".
I will post a patch to tempest shortly.