volume_attachment_get_by_* only returns first occurence

Bug #1585690 reported by John Griffith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
John Griffith

Bug Description

The cinder.db.sqlalchemy.apy implementation of volume_attachment_get_by_host and _get_by_instance_uuid only returns the first item found. Should probably return all active records, especially in the case of supporting multi-attach.

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/321095

Changed in cinder:
assignee: nobody → John Griffith (john-griffith)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to cinder (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/324049

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

Reviewed: https://review.openstack.org/321095
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=61a63dc77dc6ba6245c387f7d65b62b5ca6e8f30
Submitter: Jenkins
Branch: master

commit 61a63dc77dc6ba6245c387f7d65b62b5ca6e8f30
Author: John Griffith <email address hidden>
Date: Wed May 25 10:04:50 2016 -0600

    Fix attachment_get_by_* to return entire list

    Commit 10d54216871fde27172fbcb1a3c9bfec59b824c2 added the
    ability to query volume_attachments by host and instance_uuid.

    Minor bug however is that the original implementation also used
    a "first()" filter, so regardless of how many attachments might
    exist, only one was being returned.

    The volume_attachments object code assumes we receive a list, as
    do a number of other places. So, this patch changes the names of
    those get methods to "get_all_by_xxx" to eliminate any confusion
    and updates things to use the list appropriately.

    Change-Id: I63e4faf8a7ee3528a4dfbd7bf4e61b607ad86841
    Closes-Bug: #1585690

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/cinder 9.0.0.0b1

This issue was fixed in the openstack/cinder 9.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by John Griffith (<email address hidden>) on branch: master
Review: https://review.openstack.org/324049

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.