From 5482dde3298ce9679dbb8378fe8e216fc24dd024 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 10 Jun 2020 10:56:38 +0100 Subject: [PATCH] libvirt: Mark e1000e VIF as supported This is supported by the QEMU/KVM backends in libvirt. There's no reason not to support it in nova. This appears to have been an oversight. Change-Id: I12a5d28d75bc32a76a4f3765cb4db4cbc46c0c75 Signed-off-by: Stephen Finucane Closes-Bug: #1882919 (cherry picked from commit 644cb5cb8bf44184d9b3f046cc67746b13550dd6) (cherry picked from commit 840de3b8924612fa3fc47a4c9032a4723d536613) (cherry picked from commit ddbc262494cf0df3f3abd5b5139eb787bb085f8c) --- nova/tests/unit/virt/libvirt/test_vif.py | 2 ++ nova/virt/libvirt/vif.py | 2 ++ .../bug-1882919-support-e1000e-vif-5437a45c13dff978.yaml | 7 +++++++ 3 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/bug-1882919-support-e1000e-vif-5437a45c13dff978.yaml diff --git a/nova/tests/unit/virt/libvirt/test_vif.py b/nova/tests/unit/virt/libvirt/test_vif.py index 41e9853e0ff9..4d4168bcc714 100644 --- a/nova/tests/unit/virt/libvirt/test_vif.py +++ b/nova/tests/unit/virt/libvirt/test_vif.py @@ -835,12 +835,14 @@ class LibvirtVifTestCase(test.NoDBTestCase): network_model.VIF_MODEL_PCNET, network_model.VIF_MODEL_RTL8139, network_model.VIF_MODEL_E1000, + network_model.VIF_MODEL_E1000E, network_model.VIF_MODEL_SPAPR_VLAN) else: supported = (network_model.VIF_MODEL_NE2K_PCI, network_model.VIF_MODEL_PCNET, network_model.VIF_MODEL_RTL8139, network_model.VIF_MODEL_E1000, + network_model.VIF_MODEL_E1000E, network_model.VIF_MODEL_SPAPR_VLAN) for model in supported: image_meta = objects.ImageMeta.from_dict( diff --git a/nova/virt/libvirt/vif.py b/nova/virt/libvirt/vif.py index 209647b062ed..57ea1a73825e 100644 --- a/nova/virt/libvirt/vif.py +++ b/nova/virt/libvirt/vif.py @@ -71,6 +71,7 @@ def is_vif_model_valid_for_virt(virt_type, vif_model): network_model.VIF_MODEL_PCNET, network_model.VIF_MODEL_RTL8139, network_model.VIF_MODEL_E1000, + network_model.VIF_MODEL_E1000E, network_model.VIF_MODEL_LAN9118, network_model.VIF_MODEL_SPAPR_VLAN], 'kvm': [network_model.VIF_MODEL_VIRTIO, @@ -78,6 +79,7 @@ def is_vif_model_valid_for_virt(virt_type, vif_model): network_model.VIF_MODEL_PCNET, network_model.VIF_MODEL_RTL8139, network_model.VIF_MODEL_E1000, + network_model.VIF_MODEL_E1000E, network_model.VIF_MODEL_SPAPR_VLAN], 'xen': [network_model.VIF_MODEL_NETFRONT, network_model.VIF_MODEL_NE2K_PCI, diff --git a/releasenotes/notes/bug-1882919-support-e1000e-vif-5437a45c13dff978.yaml b/releasenotes/notes/bug-1882919-support-e1000e-vif-5437a45c13dff978.yaml new file mode 100644 index 000000000000..1e316c1f2337 --- /dev/null +++ b/releasenotes/notes/bug-1882919-support-e1000e-vif-5437a45c13dff978.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Previously, attempting to configure an instance with the ``e1000e`` or + legacy ``VirtualE1000e`` VIF types on a host using the QEMU/KVM driver + would result in an incorrect ``UnsupportedHardware`` exception. These + interfaces are now correctly marked as supported.