Can't attach volume to instance via api

Bug #1580490 reported by Ilya Bumarskov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Status tracked in 10.0.x
10.0.x
Invalid
Undecided
Ilya Bumarskov
9.x
Invalid
High
Ilya Bumarskov

Bug Description

Detailed bug description:
Fuel ISO 9.0 #299 with Mitaka release.
 Volume can't be attached to instance properly using novaclient Python API.

Steps to reproduce:
 Use novaclient Python API to create volume and attach it to instance. Here is a code example:

def attach_volume(self, volume, server, mount='/dev/vdb'):
        self.cinder.volumes.attach(volume, server.id, mount)
        return self.cinder.volumes.get(volume.id)

Expected results:
 Volume status is 'in-use' and attached to instance.

Actual result:
 Volume has 'in-use' status, but instance doesn't have attached volume (see the screenshots).

Workaround:
 Use UI or CLI for attaching volumes.

Tags: area-cinder
Revision history for this message
Ilya Bumarskov (ibumarskov) wrote :
Changed in mos:
importance: Undecided → High
assignee: nobody → MOS Cinder (mos-cinder)
milestone: none → 9.0
Revision history for this message
Ilya Bumarskov (ibumarskov) wrote :
Revision history for this message
Ilya Bumarskov (ibumarskov) wrote :
Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :

This bug affects only users who will use python client to attach volumes, we can't reproduce it via Horizon or CLI (and it is strange).

Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :

Probably the reason of this fail in incorrect parameters for new volume?

tags: added: area-cinder
Revision history for this message
Yuriy Nesenenko (ynesenenko) wrote :

The description says that you are using novaclient Python API, but in fact, in the example function attach_volume(...) used cinderclient Python API. The method cinder.volumes.attach(volume, server.id, mount) just sets attachment metadata. For clarity, we present the results of taken actions http://paste.openstack.org/show/496685/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.