nova/nova
melanie witt 7500c1910c 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
(cherry picked from commit 48fd81648a)
2019-04-17 18:57:07 +00:00
..
api Fix links to neutron QoS minimum bandwidth doc 2019-03-21 11:47:19 +01:00
cells Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00
cmd Pass kwargs to exception to get better format of error message 2019-03-15 10:42:18 +08:00
common
compute Merge "Do not log a warning about not using compute monitors" into stable/stein 2019-04-13 04:50:56 +00:00
conductor Merge "Fix incomplete instance data returned after build failure" into stable/stein 2019-04-12 13:01:23 +00:00
conf Do not log a warning about not using compute monitors 2019-04-08 15:35:04 +00:00
console Move create of ComputeAPI object in websocketproxy 2019-04-02 15:43:18 +00:00
consoleauth Fix stacktraces with redis caching backend 2018-09-27 13:15:11 -04:00
db Add retry_on_deadlock to migration_update DB API 2019-03-28 14:46:12 +00:00
hacking Add a hacking rule for deprecated assertion methods 2018-10-25 11:49:10 +09:00
image Share snapshot image membership with instance owner 2019-02-08 18:06:27 -05:00
ipv6
keymgr
locale Imported Translations from Zanata 2018-09-23 06:53:32 +00:00
network Move slight bonkers IP management to privsep. 2019-03-17 23:19:08 +00:00
notifications Remove CellMappingPayload database_connection and transport_url fields 2019-04-04 21:25:52 +00:00
objects Do not persist RequestSpec.ignore_hosts 2019-04-02 09:13:29 -04:00
pci Add get_instance_pci_request_from_vif 2019-03-07 11:37:53 +02:00
policies Merge "Remove deprecated 'flavors' policy" 2019-02-23 06:13:00 +00:00
privsep Merge "Move slight bonkers IP management to privsep." 2019-03-20 13:21:29 +00:00
scheduler Fix bug preventing forbidden traits from working 2019-04-03 07:55:26 -05:00
servicegroup Fix deprecation warning for threadgroup.add_timer 2019-02-07 09:37:00 -05:00
tests libvirt: set device address tag only if setting disk unit 2019-04-17 18:57:07 +00:00
virt libvirt: set device address tag only if setting disk unit 2019-04-17 18:57:07 +00:00
vnc Deprecate the nova-xvpvncproxy service 2018-10-15 10:03:13 +01:00
volume Merge "Avoid BadRequest error log on volume attachment" 2019-02-27 05:13:20 +00:00
__init__.py
availability_zones.py
baserpc.py
block_device.py Add method to generate device names universally 2019-01-15 18:55:11 +00:00
cache_utils.py
config.py Configure placement DB context manager for nova-manage/status 2018-09-05 10:29:48 -04:00
context.py Remove NovaException logging from scatter_gather_cells 2018-11-21 12:43:35 -05:00
crypto.py
debugger.py
exception.py Add get_instance_pci_request_from_vif 2019-03-07 11:37:53 +02:00
exception_wrapper.py Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
filters.py
hooks.py
i18n.py
loadables.py
manager.py
policy.py Fix string interpolations in logging calls 2019-01-29 15:06:39 +09:00
profiler.py
quota.py Merge "quota: remove defaults kwarg in get_project_quotas" 2019-02-26 13:26:24 +00:00
rc_fields.py Switch to using os-resource-classes 2019-02-07 11:11:09 +00:00
rpc.py Fix jsonutils.to_primitive UserWarning 2018-12-17 22:56:50 -05:00
safe_utils.py
service.py Move conductor wait_until_ready() delay before manager init 2018-08-31 12:50:10 -07:00
service_auth.py
test.py Use assertXmlEqual() helper for all XML comparison tests 2019-03-08 11:40:41 +00:00
utils.py Flavor extra spec and image properties validation from API 2019-03-05 12:05:06 -06:00
version.py
weights.py Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00
wsgi.py