← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1792077] Re: problem specifying multiple "bus=scsi" block devices on nova boot

 

Reviewed:  https://review.openstack.org/611974
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=48fd81648a7cadf2d147a6beabac067c28b288b0
Submitter: Zuul
Branch:    master

commit 48fd81648a7cadf2d147a6beabac067c28b288b0
Author: melanie witt <melwittt@xxxxxxxxx>
Date:   Fri Oct 19 22:06:20 2018 +0000

    libvirt: set device address tag only if setting disk unit
    
    In Pike, we began setting disk unit values manually for the
    'virtio-scsi' controller model in order to allow up to 256 devices [1].
    We do this by setting the disk unit of the address tag manually for the
    guest config. If we do not set the address tag manually, libvirt would
    autogenerate it for us.
    
    A problem occurs when a user has a SCSI disk that is a volume or isn't
    using the 'virtio-scsi' controller model because we're not guarding our
    manual setting of the address tag in the guest config by the disk unit,
    in addition to the SCSI bus. This means that for a SCSI volume, we
    generate an address tag like '<address type="drive" controller="0"/>'
    for any SCSI volume, so a user with more than one device will get the
    following error when they try to boot an instance:
    
      Failed to start libvirt guest: libvirtError: unsupported
        configuration: Found duplicate drive address for disk with target name
        'sda' controller='0' bus='0' target='0' unit='0'
    
    This updates the conditionals to only manually set the address tag if
    the bus is SCSI _and_ the disk unit has been specified. Otherwise, let
    libvirt autogenerate the address tag and take care of avoiding
    collisions.
    
    [1] https://bugs.launchpad.net/nova/+bug/1686116
    
    Closes-Bug: #1792077
    
    Change-Id: Iefab05e84ccc0bf8f15bdbbf515a290d282dbc5d


** Changed in: nova
       Status: In Progress => 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/1792077

Title:
  problem specifying multiple "bus=scsi" block devices on nova boot

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) ocata series:
  New
Status in OpenStack Compute (nova) pike series:
  In Progress
Status in OpenStack Compute (nova) queens series:
  In Progress
Status in OpenStack Compute (nova) rocky series:
  In Progress
Status in OpenStack Compute (nova) stein series:
  In Progress

Bug description:
  I'm using devstack stable/rocky on ubuntu 16.04.

  When running this command

  nova boot --flavor m1.small --nic net-name=public --block-device
  source=image,id=24e8e922-2687-48b5-a895-3134a650e00f,dest=volume,size=2,bootindex=0,shutdown=remove,bus=scsi
  --block-device
  source=blank,dest=volume,size=2,bootindex=1,shutdown=remove,bus=scsi
  --poll twovol

  the instance fails to boot with the error:

  libvirtError: unsupported configuration: Found duplicate drive address
  for disk with target name 'sda' controller='0' bus='0' target='0'
  unit='0'


  For some background information, this works:

  nova boot --flavor m1.small --nic net-name=public --block-device
  source=image,id=24e8e922-2687-48b5-a895-3134a650e00f,dest=volume,size=2,bootindex=0,shutdown=remove,bus=scsi
  --poll onevol

  It also works if I have two block devices but don't specify
  "bus=scsi":

  nova boot --flavor m1.small --nic net-name=public --block-device
  source=image,id=24e8e922-2687-48b5-a895-3134a650e00f,dest=volume,size=2,bootindex=0,shutdown=remove
  --block-device
  source=blank,dest=volume,size=2,bootindex=1,shutdown=remove --poll
  twovolnoscsi

  This maps to the following XML:

  Sep 12 05:05:22 devstack nova-compute[3062]:   <devices>
  Sep 12 05:05:22 devstack nova-compute[3062]:     <disk type="block" device="disk">
  Sep 12 05:05:22 devstack nova-compute[3062]:       <driver name="qemu" type="raw" cache="none" io="native"/>
  Sep 12 05:05:22 devstack nova-compute[3062]:       <source dev="/dev/sda"/>
  Sep 12 05:05:22 devstack nova-compute[3062]:       <target bus="virtio" dev="vda"/>
  Sep 12 05:05:22 devstack nova-compute[3062]:       <serial>f16cb93d-7bf0-4da7-a804-b9539d64576a</serial>
  Sep 12 05:05:22 devstack nova-compute[3062]:     </disk>
  Sep 12 05:05:22 devstack nova-compute[3062]:     <disk type="block" device="disk">
  Sep 12 05:05:22 devstack nova-compute[3062]:       <driver name="qemu" type="raw" cache="none" io="native"/>
  Sep 12 05:05:22 devstack nova-compute[3062]:       <source dev="/dev/sdb"/>
  Sep 12 05:05:22 devstack nova-compute[3062]:       <target bus="virtio" dev="vdb"/>
  Sep 12 05:05:22 devstack nova-compute[3062]:       <serial>7d5de2b0-cb66-4607-a5f5-60fd40db51c3</serial>
  Sep 12 05:05:22 devstack nova-compute[3062]:     </disk>

  In the failure case, the nova-compute logs include the following
  interesting bits.  Note the additional '<address type="drive"
  controller="0"/>' lines in the XML.

  Sep 12 04:48:43 devstack nova-compute[3062]: ERROR
  nova.virt.libvirt.guest [None req-a7c5f15c-1e44-4cd1-bf57-45b819676b20
  admin admin] Error defining a guest with XML: <domain type="qemu">

  Sep 12 04:48:43 devstack nova-compute[3062]:   <devices>
  Sep 12 04:48:43 devstack nova-compute[3062]:     <disk type="block" device="disk">
  Sep 12 04:48:43 devstack nova-compute[3062]:       <driver name="qemu" type="raw" cache="none" io="native"/>
  Sep 12 04:48:43 devstack nova-compute[3062]:       <source dev="/dev/sda"/>
  Sep 12 04:48:43 devstack nova-compute[3062]:       <target bus="scsi" dev="sda"/>
  Sep 12 04:48:43 devstack nova-compute[3062]:       <serial>08561cc0-5cf2-4eb7-a3f9-956f945e6c24</serial>
  Sep 12 04:48:43 devstack nova-compute[3062]:       <address type="drive" controller="0"/>
  Sep 12 04:48:43 devstack nova-compute[3062]:     </disk>
  Sep 12 04:48:43 devstack nova-compute[3062]:     <disk type="block" device="disk">
  Sep 12 04:48:43 devstack nova-compute[3062]:       <driver name="qemu" type="raw" cache="none" io="native"/>
  Sep 12 04:48:43 devstack nova-compute[3062]:       <source dev="/dev/sdb"/>
  Sep 12 04:48:43 devstack nova-compute[3062]:       <target bus="scsi" dev="sdb"/>
  Sep 12 04:48:43 devstack nova-compute[3062]:       <serial>007fac3d-8800-4f45-9531-e3bab5c86a1e</serial>
  Sep 12 04:48:43 devstack nova-compute[3062]:       <address type="drive" controller="0"/>
  Sep 12 04:48:43 devstack nova-compute[3062]:     </disk>

  Sep 12 04:48:43 devstack nova-compute[3062]: : libvirtError: unsupported configuration: Found duplicate drive address for disk with target name 'sda' controller='0' bus='0' target='0' unit='0'
  Sep 12 04:48:43 devstack nova-compute[3062]: ERROR nova.virt.libvirt.driver [None req-a7c5f15c-1e44-4cd1-bf57-45b819676b20 admin admin] [instance: cf4f2c6f-7391-4a49-8f40-5e5cda98f78b] Failed to start libvirt guest: libvirtError: unsupported configuration: Found duplicate drive address for disk with target name 'sda' controller='0' bus='0' target='0' unit='0'

  Here is the libvirtd log in the failure case:

  2018-09-12 04:48:43.312+0000: 16889: error :
  virDomainDefCheckDuplicateDriveAddresses:5747 : unsupported
  configuration: Found duplicate drive address for disk with target name
  'sda' controller='0' bus='0' target='0' unit='0'

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


References