cinder-manage volume delete doesn't support volume ids in uuid format

Bug #1158409 reported by stephen mulcahy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
stephen mulcahy

Bug Description

cinder-manage volume delete uses param2id() function to convert user-specified volume id to internal id. param2id() in trunk currently looks like

def param2id(object_id):
    """Helper function to convert various id types to internal id.
    args: [object_id], e.g. 'vol-0000000a' or 'volume-0000000a' or '10'
    """
    if '-' in object_id:
        # FIXME(ja): mapping occurs in nova?
        pass
    else:
        return int(object_id)

which looks like it'll never return an id for an object_id with a dash in it (which includes all uuids).

Propose updating param2id to return the object_id unmodified if it looks like a uuid (using uuidutils.is_uuid_like from openstack common) which will address the lack of uuid support (I'm not proposing to address the lack of ec2 id support here)

Changed in cinder:
assignee: nobody → stephen mulcahy (stephen-mulcahy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in cinder:
milestone: none → grizzly-rc2
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/25034
Committed: http://github.com/openstack/cinder/commit/e1561b8f8a05f3cd6b8635683b178f924384de65
Submitter: Jenkins
Branch: master

commit e1561b8f8a05f3cd6b8635683b178f924384de65
Author: Stephen Mulcahy <email address hidden>
Date: Thu Mar 21 17:57:24 2013 +0000

    Extend param2id() to work with uuids

    Add uuid support to param2id() to allow commands including
    cinder-manage volume delete to work with uuid style volumd ids

    Fixes bug #1158409

    Change-Id: I2d197320b61f44d1104ed0342a6b5b70f673468a

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/25219

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (milestone-proposed)

Reviewed: https://review.openstack.org/25219
Committed: http://github.com/openstack/cinder/commit/53a638773fbc67e4b42e3d49c470496c71f7e5d6
Submitter: Jenkins
Branch: milestone-proposed

commit 53a638773fbc67e4b42e3d49c470496c71f7e5d6
Author: Stephen Mulcahy <email address hidden>
Date: Thu Mar 21 17:57:24 2013 +0000

    Extend param2id() to work with uuids

    Add uuid support to param2id() to allow commands including
    cinder-manage volume delete to work with uuid style volumd ids

    Fixes bug #1158409

    Change-Id: I2d197320b61f44d1104ed0342a6b5b70f673468a
    (cherry picked from commit e1561b8f8a05f3cd6b8635683b178f924384de65)

Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: grizzly-rc2 → 2013.1
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.