← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1221244] Re: baremetal driver misuses "instance" parameter of attach/detach_volume()

 

** Changed in: nova
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1221244

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

Status in OpenStack Compute (Nova):
  Fix Released

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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1221244/+subscriptions