interfaces of type "network" are reported as type "bridge"

Bug #1766888 reported by Hervé BRY
8
This bug affects 1 person
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/qemu/dev.xml
[ ... ]
    <interface type='network'>
      <mac address='52:54:00:eb:b2:b8'/>
      <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='52:54:00:eb:b2:b8'/>
      <source network='ovsbr0' portgroup='vlan1' bridge='ovsbr0'/>
      <vlan>
        <tag id='1'/>
      </vlan>
      <virtualport type='openvswitch'>
        <parameters interfaceid='732763c6-78b7-40b2-a02a-0c2216952988'/>
      </virtualport>
      <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>ovsbr0</name>
  <uuid>49bd2303-ae07-4466-aff7-d6c33817b032</uuid>
  <forward mode='bridge'/>
  <bridge name='ovsbr0'/>
  <virtualport type='openvswitch'/>
  <portgroup name='vlan1' default='yes'>
    <vlan>
      <tag id='1'/>
    </vlan>
  </portgroup>
</network>

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I agree that this still is the case:

xml:
        <interface type='network'>
                <source network='ovsbr0'/>
                <model type='virtio'/>
                <driver name='vhost' queues='4'/>
                <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
        </interface>

dumpxml from defined guest:
    <interface type='bridge'>
      <mac address='52:54:00:a5:a6:eb'/>
      <source network='ovsbr0' bridge='ovsbr0'/>
      <virtualport type='openvswitch'>
        <parameters interfaceid='f221387d-859a-4e2a-b159-6cdc75b92597'/>
      </virtualport>
      <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/formatdomain.html

Changed in libvirt (Ubuntu):
status: New → Incomplete
status: Incomplete → Opinion
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.