Attach volume via Nova API != Attach volume via Cinder API

Bug #1112998 reported by Gabriel Hurley
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Wishlist
Mike Perez
OpenStack Compute (nova)
Fix Released
Wishlist
Oleg Bondarev

Bug Description

I just discovered that novaclient's "volumes.create_server_volume" command and cinderclient's "volumes.attach" command are not equal. They both result in the specified volume being attached to the specified instance, but only novaclient's command makes Nova aware of the attachment such that novaclient's "volumes.get_server_volumes" command returns the attachment data.

Unfortunately, without novaclient's volumes.get_server_volumes command returning the correct data there is no good way to go from an instance ID to a list of attached volumes. That data is not returned with the detailed instance info (as it should be), and it can't be filtered out of a volume listing without retrieving every volume and manually filtering them based on their attachments dict.

My recommendation is twofold:

  1. Cinder needs an easy way to retrieve a list of volumes attached to a given instance, and
  2. Nova needs to include the list of attached volumes with the instance details the same way it returns lists of IP addresses, security groups, etc.

Tags: api
Revision history for this message
Vish Ishaya (vishvananda) wrote :

I can see how this is confusing:

The cinderclient attach command is solely to mark the volume attached in cinder. It is modifying metadata. When nova attaches a volume, it uses the cinderclient command to let cinder know that it has attached a volume.

Revision history for this message
John Griffith (john-griffith) wrote :

So part of this is the nature of the design I think... but that being said.

If I were to add a filter to cinderclient like "cinder list --attached-to-instance XXXXXX", would that give you what you need here? I think it's a useful filter regardless.

Chuck Short (zulcss)
Changed in nova:
importance: Undecided → Wishlist
status: New → Confirmed
Changed in cinder:
status: New → Confirmed
Mike Perez (thingee)
tags: added: api
Changed in cinder:
assignee: nobody → Mike Perez (thingee)
importance: Undecided → Wishlist
Changed in nova:
assignee: nobody → Oleg Bondarev (obondarev)
Changed in nova:
milestone: none → havana-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/27067

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/27067
Committed: http://github.com/openstack/nova/commit/dd66f235ecf2ff67819917ee07bcb0ea13a1b17b
Submitter: Jenkins
Branch: master

commit dd66f235ecf2ff67819917ee07bcb0ea13a1b17b
Author: Oleg Bondarev <email address hidden>
Date: Wed Apr 17 18:18:03 2013 +0400

    Include list of attached volumes with instance info

    Fixes bug 1112998

    Change-Id: I1c3eb578339aabbcfed107043f39e30daf633c4a

Changed in nova:
status: In Progress → Fix Committed
Changed in cinder:
status: Confirmed → Invalid
importance: Wishlist → Undecided
importance: Undecided → Wishlist
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.2
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.