commit bbc562c572f328cc6ffa9cdbff83ae64672fe5b8
Author: Lee Yarwood <email address hidden>
Date: Fri May 1 14:20:04 2020 +0100
compute: Validate a BDMs disk_bus when provided
Previously disk_bus values were never validated and could easily end up
being ignored by the underlying virt driver and hypervisor.
For example, a common mistake made by users is to request a virtio-scsi
disk_bus when using the libvirt virt driver. This however isn't a valid
bus and is ignored, defaulting back to the virtio (virtio-blk) bus.
This change adds a simple validation in the compute API using the
potential disk_bus values provided by the DiskBus field class as used
when validating the hw_*_bus image properties.
NOTE(lyarwood): Conflict as If9c459a9a0aa752c478949e4240286cbdb146494 is
not present in stable/train. test_validate_bdm_disk_bus is also updated
as Ib31ba2cbff0ebb22503172d8801b6e0c3d2aa68a is not present in
stable/train.
Closes-Bug: #1876301
Change-Id: I77b28b9cc8f99b159f628f4655d85ff305a71db8
(cherry picked from commit 5913bd889f9d3dfc8d154415e666c821054c229d)
(cherry picked from commit fb31ae430a2e4f8869e77e31ea0d6a9478f6aa61)
Reviewed: https:/ /review. opendev. org/744552 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=bbc562c572f 328cc6ffa9cdbff 83ae64672fe5b8
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit bbc562c572f328c c6ffa9cdbff83ae 64672fe5b8
Author: Lee Yarwood <email address hidden>
Date: Fri May 1 14:20:04 2020 +0100
compute: Validate a BDMs disk_bus when provided
Previously disk_bus values were never validated and could easily end up
being ignored by the underlying virt driver and hypervisor.
For example, a common mistake made by users is to request a virtio-scsi
disk_bus when using the libvirt virt driver. This however isn't a valid
bus and is ignored, defaulting back to the virtio (virtio-blk) bus.
This change adds a simple validation in the compute API using the
potential disk_bus values provided by the DiskBus field class as used
when validating the hw_*_bus image properties.
Conflicts:
nova/tests/ unit/compute/ test_compute_ api.py
NOTE(lyarwood): Conflict as If9c459a9a0aa75 2c478949e424028 6cbdb146494 is bdm_disk_ bus is also updated 22503172d8801b6 e0c3d2aa68a is not present in
not present in stable/train. test_validate_
as Ib31ba2cbff0ebb
stable/train.
Closes-Bug: #1876301 159f628f4655d85 ff305a71db8 c8d154415e666c8 21054c229d) 869e77e31ea0d6a 9478f6aa61)
Change-Id: I77b28b9cc8f99b
(cherry picked from commit 5913bd889f9d3df
(cherry picked from commit fb31ae430a2e4f8