vmtest/cloud_tests: replace usermode network with bridge due to unreliability of user-mode networking.

Bug #1742778 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Low
Unassigned
curtin
Triaged
Low
Unassigned

Bug Description

user mode networking can be problematic.
The most recent issue we've' hit is that the dhcp server seems to hand the same address back to all nics on it.

While other networking solutions priviledged access to create a bridge, they are ultimately mroe reliable.

Revision history for this message
Ryan Harper (raharper) wrote :

It turns out that we were constructing multiple qemu "vlans" which aren't actual 802.1q vlans but rather something akin to network hubs w.r.t to which devices see which packets.

A -netdev user,id=net00 and -device virtio-net-pci,netdev=net00 pairs a slirp/usernetwork backend with a virtio-net-pci device ,each one of those pairs runs it's own copy of slirp independent of each other. From qemu monitor the network setup looked like this:

info network
virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:00
 \ net00: index=0,type=user,net=10.0.2.0,restrict=off
virtio-net-pci.1: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:02
 \ net01: index=0,type=user,net=10.0.2.0,restrict=off
virtio-net-pci.2: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:04
 \ net02: index=0,type=user,net=10.0.2.0,restrict=off
virtio-net-pci.3: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:06
 \ net03: index=0,type=user,net=10.0.2.0,restrict=off
virtio-net-pci.4: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:08
 \ net04: index=0,type=user,net=10.0.2.0,restrict=off
virtio-net-pci.5: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:0a
 \ net05: index=0,type=user,net=10.0.2.0,restrict=off

This allowed the multi nic setup to DHCP on each nic and obtain the same IP address since the default user/slirp network config is the same (10.0.2.0/24, dhcpstart=10.0.2.15).

If we use -net user -net nic (legacy and depricated options) we can obtain a configuration with one slirp/user network services for a hub of devices but that means we lose some configuration ability in xkvm around use of -netdev and -device. Here is how we got the hub mode working though:

    -netdev hubport,id=hubport0,hubid=0 \
    -netdev hubport,id=hubport1,hubid=0 \
    -device virtio-net-pci,netdev=hubport0 \
    -device virtio-net-pci,netdev=hubport1 \

Produces a qemu network like this:

(qemu) info network
hub 0
 \ hub0port2: user.0: index=0,type=user,net=10.0.3.0,restrict=off
 \ hubport1: virtio-net-pci.1: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:57
 \ hubport0: virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56

Scott Moser (smoser)
description: updated
Scott Moser (smoser)
summary: - replace usermode network with bridge due to unreliability of user-mode
- networking.
+ vmtest/cloud_tests: replace usermode network with bridge due to
+ unreliability of user-mode networking.
Changed in cloud-init:
status: New → Triaged
Changed in curtin:
status: New → Triaged
Changed in cloud-init:
importance: Undecided → Low
Changed in curtin:
importance: Undecided → Low
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
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.