Calico still uses vif type tap and it causes failures with libvirt 9.5.0

Bug #2033681 reported by Arun S A G
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)

Bug Description

Calico (out of tree) uses vif type tap. But libvirt doesn't like pre-existing tap devices from libvirt 9.5.0. This causes openstack clusters that run calico networking backend to fail during instance creation.

Steps to reproduce
1. Configure calico
2. Run openstack with libvirt 9.5.0 (latest in centos 9 stream)
3. Boot a VM

Expected result
The VM is able to boot without any problems

Actual result

Other information

13:34:38 < sean-k-mooney> calico is apparently still using vif type tap

13:35:06 < sean-k-mooney> vif type tap is not supported by our os-vif code so its usign the legacy fallback
13:35:51 < sean-k-mooney>
13:36:15 < sean-k-mooney>
13:36:48 < sean-k-mooney>

13:37:40 < sean-k-mooney> zer0c00l: with that said the tap was always ment to be created by libvirt so it sound like calico might have been doing things it shoudl not have been
13:38:03 < zer0c00l> sean-k-mooney: Thanks for looking into this. :(
13:38:36 < sean-k-mooney> we could proably correct this with a bug fix
13:38:52 < sean-k-mooney> jsut setting managed='no'
13:39:13 < sean-k-mooney> here
13:39:54 < sean-k-mooney> the problem is that the there is no way to test this really upstream
13:40:06 < sean-k-mooney> well beyond unit/fucntional tests
13:40:12 < sean-k-mooney> but we dont have any calico ci
13:40:37 < sean-k-mooney> calico should be the only backend using vif_type=tap
13:40:52 < sean-k-mooney> but im not sure if we woudl need a config option in the workarounds section for this or not

Potential patch
diff --git a/nova/virt/libvirt/ b/nova/virt/libvirt/
index 47e92e3..5af3ce4 100644
--- a/nova/virt/libvirt/
+++ b/nova/virt/libvirt/
@@ -1749,6 +1749,7 @@
         self.device_addr = None
         self.mtu = None
         self.alias = None
+ self.managed = 'no'

     def __eq__(self, other):
         if not isinstance(other, LibvirtConfigGuestInterface):
@@ -1851,7 +1852,7 @@

         if self.target_dev is not None:
- dev.append(etree.Element("target", dev=self.target_dev))
+ dev.append(etree.Element("target", dev=self.target_dev, managed=self.managed))

         if self.vporttype is not None:
             vport = etree.Element("virtualport", type=self.vporttype)

Changed in nova:
status: New → Confirmed
tags: added: netwo
tags: added: low-hanging-fruit network
removed: netwo
Changed in nova:
importance: Undecided → Low
tags: added: libvirt
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.