← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1773941] [NEW] Not able to attach more than 25 volumes using virtio-scsi

 

Public bug reported:

Not able to attach more than 25 volumes using virtio-scsi

In nova/virt/libvirt/blockinfo.py,

def get_dev_count_for_disk_bus(disk_bus):
    """Determine the number disks supported.

       Determine how many disks can be supported in
       a single VM for a particular disk bus.

       Returns the number of disks supported.
    """

    if disk_bus == "ide":
        return 4
    else:
        return 26 <=== we're just responding with 26 devices that we can use.

and


def find_disk_dev_for_disk_bus(mapping, bus,
                               last_device=False,
                               assigned_devices=None):
    """Identify a free disk dev name for a bus.

       Determines the possible disk dev names for
       the bus, and then checks them in order until
       it identifies one that is not yet used in the
       disk mapping. If 'last_device' is set, it will
       only consider the last available disk dev name.

       Returns the chosen disk_dev name, or raises an
       exception if none is available.
    """

    dev_prefix = get_dev_prefix_for_disk_bus(bus)
    if dev_prefix is None:
        return None

    if assigned_devices is None:
        assigned_devices = []

    max_dev = get_dev_count_for_disk_bus(bus)
    if last_device:
        devs = [max_dev - 1]
    else:
        devs = range(max_dev)

    for idx in devs:
        disk_dev = dev_prefix + chr(ord('a') + idx)  <====== need to correct naming of devices
        if not has_disk_dev(mapping, disk_dev):
            if disk_dev not in assigned_devices:
                return disk_dev

    raise exception.NovaException(
        _("No free disk device names for prefix '%s'") %
        dev_prefix)

** Affects: nova
     Importance: Undecided
         Status: New

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

Title:
  Not able to attach more than 25 volumes using virtio-scsi

Status in OpenStack Compute (nova):
  New

Bug description:
  Not able to attach more than 25 volumes using virtio-scsi

  In nova/virt/libvirt/blockinfo.py,

  def get_dev_count_for_disk_bus(disk_bus):
      """Determine the number disks supported.

         Determine how many disks can be supported in
         a single VM for a particular disk bus.

         Returns the number of disks supported.
      """

      if disk_bus == "ide":
          return 4
      else:
          return 26 <=== we're just responding with 26 devices that we can use.

  and

  
  def find_disk_dev_for_disk_bus(mapping, bus,
                                 last_device=False,
                                 assigned_devices=None):
      """Identify a free disk dev name for a bus.

         Determines the possible disk dev names for
         the bus, and then checks them in order until
         it identifies one that is not yet used in the
         disk mapping. If 'last_device' is set, it will
         only consider the last available disk dev name.

         Returns the chosen disk_dev name, or raises an
         exception if none is available.
      """

      dev_prefix = get_dev_prefix_for_disk_bus(bus)
      if dev_prefix is None:
          return None

      if assigned_devices is None:
          assigned_devices = []

      max_dev = get_dev_count_for_disk_bus(bus)
      if last_device:
          devs = [max_dev - 1]
      else:
          devs = range(max_dev)

      for idx in devs:
          disk_dev = dev_prefix + chr(ord('a') + idx)  <====== need to correct naming of devices
          if not has_disk_dev(mapping, disk_dev):
              if disk_dev not in assigned_devices:
                  return disk_dev

      raise exception.NovaException(
          _("No free disk device names for prefix '%s'") %
          dev_prefix)

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


Follow ups