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

Bug #1773941 reported by Purandhar Sairam Mannidi
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Wishlist
Unassigned

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)

Revision history for this message
Matt Riedemann (mriedem) wrote :

This isn't really a bug, and there is a blueprint for this with some discussion:

https://blueprints.launchpad.net/nova/+spec/nova-improvement-of-maximum-attach-volumes-more-than-26-vols

Changed in nova:
status: New → Incomplete
status: Incomplete → Opinion
importance: Undecided → Wishlist
Revision history for this message
Purandhar Sairam Mannidi (sai438) wrote :

@Matt , the core idea behind virtio-scsi is to be able to use more than 26 disks or 32 devices as a whole limit. This should have been done as part of implementation of virtio-scsi support. I still feel it as a bug without which virtio-scsi feature is incomplete.

Revision history for this message
Purandhar Sairam Mannidi (sai438) wrote :

In any case, since there is a blueprint, i suppose it's better continuing the discussion there.

Revision history for this message
Purandhar Sairam Mannidi (sai438) wrote :

After looking at the blueprint, seems like they are extending default count of virtio devices which i think needs a discussion. I'd suggest using virtio-scsi rather than increasing default count of virtio-blk devices and increase the default count for virtio-scsi.

Revision history for this message
melanie witt (melwitt) wrote :

Note: the blueprint name has been changed to match the name of the nova spec:

https://blueprints.launchpad.net/nova/+spec/conf-max-attach-volumes

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.