vmtest/cloud_tests: replace usermode network with bridge due to unreliability of user-mode networking.
Bug #1742778 reported by
Scott Moser
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.
description: | updated |
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 |
To post a comment you must log in.
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 type=nic, model=virtio- net-pci, macaddr= 52:54:00: 12:34:00 type=user, net=10. 0.2.0,restrict= off type=nic, model=virtio- net-pci, macaddr= 52:54:00: 12:34:02 type=user, net=10. 0.2.0,restrict= off type=nic, model=virtio- net-pci, macaddr= 52:54:00: 12:34:04 type=user, net=10. 0.2.0,restrict= off type=nic, model=virtio- net-pci, macaddr= 52:54:00: 12:34:06 type=user, net=10. 0.2.0,restrict= off type=nic, model=virtio- net-pci, macaddr= 52:54:00: 12:34:08 type=user, net=10. 0.2.0,restrict= off type=nic, model=virtio- net-pci, macaddr= 52:54:00: 12:34:0a type=user, net=10. 0.2.0,restrict= off
virtio-net-pci.0: index=0,
\ net00: index=0,
virtio-net-pci.1: index=0,
\ net01: index=0,
virtio-net-pci.2: index=0,
\ net02: index=0,
virtio-net-pci.3: index=0,
\ net03: index=0,
virtio-net-pci.4: index=0,
\ net04: index=0,
virtio-net-pci.5: index=0,
\ net05: index=0,
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 \ id=hubport1, hubid=0 \ net-pci, netdev= hubport0 \ net-pci, netdev= hubport1 \
-netdev hubport,
-device virtio-
-device virtio-
Produces a qemu network like this:
(qemu) info network type=user, net=10. 0.3.0,restrict= off type=nic, model=virtio- net-pci, macaddr= 52:54:00: 12:34:57 type=nic, model=virtio- net-pci, macaddr= 52:54:00: 12:34:56
hub 0
\ hub0port2: user.0: index=0,
\ hubport1: virtio-net-pci.1: index=0,
\ hubport0: virtio-net-pci.0: index=0,