[openstack-dev] [Cinder] test_preattach_status_volume test failure

Michael J Fork mjfork at us.ibm.com
Fri Mar 8 08:07:57 UTC 2013



After updating the Cinder oslo rpc libraries to the latest (see
https://review.openstack.org/#/c/23822/), Cinder
test_preattach_status_volume fails with the following:

======================================================================
FAIL: Ensure volume goes into pre-attaching state
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/home/openstack/dev/cinder/cinder/tests/test_volume.py", line
308, in test_preattach_status_volume
    self.assertEqual(vol['status'], "available")

and the test

    def test_preattach_status_volume(self):
        """Ensure volume goes into pre-attaching state"""
        instance_uuid = '12345678-1234-5678-1234-567812345678'
        mountpoint = "/dev/sdf"
        volume = db.volume_create(self.context, {'size': 1,
                                                 'status': 'available'})
        volume_id = volume['id']

        volume_api = cinder.volume.api.API()
        volume_api.attach(self.context, volume, instance_uuid, mountpoint)

        vol = db.volume_get(self.context, volume_id)
        self.assertEqual(vol['status'], "available")
        self.assertEqual(vol['attach_status'], None)
        self.assertEqual(vol['instance_uuid'], None)

I would expect volume_api.attach call to set the state to "in-use" (as the
error shows it was) vs still being "available". Is this a legitimate bug
that needs fixed or is the error caused by something in the oslo update?

Thanks.

Michael

-------------------------------------------------
Michael Fork
Architect, OpenStack Development
IBM Systems & Technology Group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130308/d1d03d91/attachment.html>


More information about the OpenStack-dev mailing list