baremetal driver misuses "instance" parameter of attach/detach_volume()

Bug #1221244 reported by Arata Notsu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Arata Notsu

Bug Description

These methods that handle block device mapping pass instance['name'] to attach/detach_volume(), but it should be instance itself.

    def _attach_block_devices(self, instance, block_device_info):
        block_device_mapping = driver.\
                block_device_info_get_mapping(block_device_info)
        for vol in block_device_mapping:
            connection_info = vol['connection_info']
            mountpoint = vol['mount_device']
            self.attach_volume(
                    connection_info, instance['name'], mountpoint)

    def _detach_block_devices(self, instance, block_device_info):
        block_device_mapping = driver.\
                block_device_info_get_mapping(block_device_info)
        for vol in block_device_mapping:
            connection_info = vol['connection_info']
            mountpoint = vol['mount_device']
            self.detach_volume(
                    connection_info, instance['name'], mountpoint)

Tags: baremetal
Arata Notsu (arata776)
description: updated
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/45234

Changed in nova:
assignee: nobody → Arata Notsu (arata776)
status: New → In Progress
Mark McLoughlin (markmc)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit af911f12fe726ae17601e2381455742882ca71e8
Author: Arata Notsu <email address hidden>
Date: Sun Sep 8 23:09:43 2013 +0900

    baremetal: Fix misuse of "instance" parameter of attach/detach_volume

    Some parts of baremetal driver treat "instance" parameter as if it is
    the name of an instance, but actually it is the instance itself (dict).

    Closes-Bug: #1221244
    Change-Id: I01a296a6ac0bbf7c5fec3434ddf1197828b849b6

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.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.