interfaces of type "network" are reported as type "bridge"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Opinion
|
Undecided
|
Unassigned |
Bug Description
On Ubuntu 16.04 and libvirt 1.3.1, libvirt wrongly reports the interfaces of type "network" as type "bridge".
This confuses virt-manager and thus does not allow for example to modify the interface portgroup once it has been created.
To reproduce, add a network interface to a domain, connected to an openvswitch bridge. You can then check that the interface reported by libvirt (through virsh, virt-manager or python-libvirt) has the type "bridge" and not "network" as it should.
The network is working nonetheless, only the reported configuration is wrong.
Versions :
root@virt6:~# lsb_release -rd
Description: Ubuntu 16.04.4 LTS
Release: 16.04
root@virt6:~# dpkg -l | grep libvirt
ii libvirt-bin 1.3.1-1ubuntu10.21 amd64 programs for the libvirt library
ii libvirt0:amd64 1.3.1-1ubuntu10.21 amd64 library for interfacing with different virtualization systems
ii python-libvirt 1.3.1-1ubuntu1.1 amd64 libvirt Python bindings
The domain configuration (irrelevant parts removed) :
root@virt6:~# cat /etc/libvirt/
[ ... ]
<interface type='network'>
<mac address=
<source network='ovsbr0' portgroup='vlan1'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
[ ... ]
root@virt6:~# virsh dumpxml dev
[ ... ]
<interface type='bridge'>
<mac address=
<source network='ovsbr0' portgroup='vlan1' bridge='ovsbr0'/>
<vlan>
<tag id='1'/>
</vlan>
<virtualport type='openvswitch'>
<parameters interfaceid=
<
<target dev='vnet3'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
[ ... ]
And if it can be useful, the network definition :
root@virt6:~# virsh net-dumpxml ovsbr0
<network connections='6'>
<name>
<uuid>
<forward mode='bridge'/>
<bridge name='ovsbr0'/>
<virtualport type='openvswit
<portgroup name='vlan1' default='yes'>
<vlan>
<tag id='1'/>
</vlan>
</portgroup>
</network>
I agree that this still is the case:
xml:
<source network='ovsbr0'/>
<model type='virtio'/>
<driver name='vhost' queues='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
<interface type='network'>
dumpxml from defined guest: '52:54: 00:a5:a6: eb'/> 'f221387d- 859a-4e2a- b159-6cdc75b925 97'/> /virtualport>
<interface type='bridge'>
<mac address=
<source network='ovsbr0' bridge='ovsbr0'/>
<virtualport type='openvswitch'>
<parameters interfaceid=
<
<target dev='vnet1'/>
<model type='virtio'/>
<driver name='vhost' queues='4'/>
<alias name='net1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
So far I've only seen this with OVS bridges.
E.g. a usual type network virtio device stays type network.
Per [1] it seems that type bridge is actually correct to attach to OVS.
That said I'd think it is a compat that cleans up for both of us and fixes it when instantiating the OVS attachment.
If you "virsh destroy" the guest it will be back to a type network.
I think this is all as it should be, in the moment it is attached it is considered a bridge then.
Otherwise I think we should discuss this with upstream instead of here.
If you report something there please add a link to the upstream discussion in the mail archive here.
[1]: https:/ /libvirt. org/formatdomai n.html