Bug 1283241 - Failure to add the default NAT network in virt-manager
Failure to add the default NAT network in virt-manager
Status: CLOSED DUPLICATE of bug 1279285
Product: Fedora
Classification: Fedora
Component: virt-manager (Show other bugs)
rawhide
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Cole Robinson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-18 08:52 EST by Alexander Todorov
Modified: 2015-11-18 09:22 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-18 09:22:00 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alexander Todorov 2015-11-18 08:52:05 EST
Description of problem:

On a recently installed and upgraded host using virt-manager I've tried to add a new network. This is the "default" 192.168.122.0/24 network which is a NAT to any physical device. Virt-manager's log is below:


[Wed, 18 Nov 2015 15:41:14 virt-manager 4417] DEBUG (network:256) Creating virtual network 'default' with xml:
<network>
  <name>default</name>
  <uuid>679aa830-7165-40d2-84ef-17a6c4dbe850</uuid>
  <forward mode="nat"/>
  <domain name="default"/>
  <ip address="192.168.122.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.122.128" end="192.168.122.254"/>
    </dhcp>
  </ip>
</network>

[Wed, 18 Nov 2015 15:41:15 virt-manager 4417] DEBUG (connection:736) network lifecycle event: network=default event=0 reason=0
[Wed, 18 Nov 2015 15:41:15 virt-manager 4417] DEBUG (connection:736) network lifecycle event: network=default event=1 reason=0
[Wed, 18 Nov 2015 15:41:15 virt-manager 4417] DEBUG (libvirtobject:192) Error initializing libvirt state for <network.vmmNetwork object at 0x7f26d60e2a00 (virtManager+network+vmmNetwork at 0x55956e202420)>
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 189, in init_libvirt_state
    self._init_libvirt_state()
  File "/usr/share/virt-manager/virtManager/network.py", line 72, in _init_libvirt_state
    self.tick()
  File "/usr/share/virt-manager/virtManager/network.py", line 69, in tick
    self._refresh_status()
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 231, in _refresh_status
    newstatus = self._get_backend_status()
  File "/usr/share/virt-manager/virtManager/network.py", line 65, in _get_backend_status
    return self._backend_get_active()
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 248, in _backend_get_active
    return (bool(self._backend.isActive()) and
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2975, in isActive
    if ret == -1: raise libvirtError ('virNetworkIsActive() failed', net=self)
libvirtError: Network not found: no network with matching uuid '679aa830-7165-40d2-84ef-17a6c4dbe850' (default)
[Wed, 18 Nov 2015 15:41:15 virt-manager 4417] DEBUG (connection:1005) network=default status=Inactive added
[Wed, 18 Nov 2015 15:41:15 virt-manager 4417] ERROR (host:527) Network not found: no network with matching uuid '679aa830-7165-40d2-84ef-17a6c4dbe850' (default)
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/host.py", line 525, in net_selected
    self.populate_net_state(net)
  File "/usr/share/virt-manager/virtManager/host.py", line 627, in populate_net_state
    self.widget("net-device").set_text(net.get_bridge_device() or "")
  File "/usr/share/virt-manager/virtManager/network.py", line 115, in get_bridge_device
    return self.get_xmlobj().bridge
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 337, in get_xmlobj
    self.ensure_latest_xml()
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 290, in ensure_latest_xml
    self.__force_refresh_xml(nosignal=nosignal)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 305, in __force_refresh_xml
    active_xml = self._XMLDesc(self._active_xml_flags)
  File "/usr/share/virt-manager/virtManager/network.py", line 56, in _XMLDesc
    return self._backend.XMLDesc(flags)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2932, in XMLDesc
    if ret is None: raise libvirtError ('virNetworkGetXMLDesc() failed', net=self)
libvirtError: Network not found: no network with matching uuid '679aa830-7165-40d2-84ef-17a6c4dbe850' (default)
[Wed, 18 Nov 2015 15:41:15 virt-manager 4417] ERROR (host:527) Network not found: no network with matching uuid '679aa830-7165-40d2-84ef-17a6c4dbe850' (default)
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/host.py", line 525, in net_selected
    self.populate_net_state(net)
  File "/usr/share/virt-manager/virtManager/host.py", line 627, in populate_net_state
    self.widget("net-device").set_text(net.get_bridge_device() or "")
  File "/usr/share/virt-manager/virtManager/network.py", line 115, in get_bridge_device
    return self.get_xmlobj().bridge
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 337, in get_xmlobj
    self.ensure_latest_xml()
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 290, in ensure_latest_xml
    self.__force_refresh_xml(nosignal=nosignal)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 305, in __force_refresh_xml
    active_xml = self._XMLDesc(self._active_xml_flags)
  File "/usr/share/virt-manager/virtManager/network.py", line 56, in _XMLDesc
    return self._backend.XMLDesc(flags)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2932, in XMLDesc
    if ret is None: raise libvirtError ('virNetworkGetXMLDesc() failed', net=self)
libvirtError: Network not found: no network with matching uuid '679aa830-7165-40d2-84ef-17a6c4dbe850' (default)
[Wed, 18 Nov 2015 15:41:15 virt-manager 4417] DEBUG (error:99) error dialog message:
summary=Error creating virtual network: Unable to set bridge virbr0 forward_delay: Numerical result out of range
details=Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/createnet.py", line 746, in _async_net_create
    net.install()
  File "/usr/share/virt-manager/virtinst/network.py", line 261, in install
    net.create()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2960, in create
    if ret == -1: raise libvirtError ('virNetworkCreate() failed', net=self)
libvirtError: Unable to set bridge virbr0 forward_delay: Numerical result out of range


journalctl is below:

Nov 18 15:41:15 localhost.localdomain NetworkManager[1166]: <info>  (virbr0): new Bridge device (carrier: OFF, driver: 'bridge', ifindex: 11)
Nov 18 15:41:15 localhost.localdomain systemd-udevd[4438]: Could not generate persistent MAC address for virbr0: No such file or directory
Nov 18 15:41:15 localhost.localdomain NetworkManager[1166]: <info>  (virbr0-nic): new Tun device (carrier: OFF, driver: 'tun', ifindex: 12)
Nov 18 15:41:15 localhost.localdomain audit: ANOM_PROMISCUOUS dev=virbr0-nic prom=256 old_prom=0 auid=4294967295 uid=0 gid=0 ses=4294967295
Nov 18 15:41:15 localhost.localdomain kernel: device virbr0-nic entered promiscuous mode
Nov 18 15:41:15 localhost.localdomain NetworkManager[1166]: <info>  (virbr0): bridge port virbr0-nic was attached
Nov 18 15:41:15 localhost.localdomain NetworkManager[1166]: <info>  (virbr0-nic): enslaved to virbr0
Nov 18 15:41:15 localhost.localdomain NetworkManager[1166]: <info>  (virbr0-nic): link connected
Nov 18 15:41:15 localhost.localdomain libvirtd[1272]: Unable to set bridge virbr0 forward_delay: Numerical result out of range
Nov 18 15:41:15 localhost.localdomain audit: ANOM_PROMISCUOUS dev=virbr0-nic prom=0 old_prom=256 auid=4294967295 uid=0 gid=0 ses=4294967295
Nov 18 15:41:15 localhost.localdomain kernel: device virbr0-nic left promiscuous mode
Nov 18 15:41:15 localhost.localdomain kernel: virbr0: port 1(virbr0-nic) entered disabled state
Nov 18 15:41:15 localhost.localdomain NetworkManager[1166]: <info>  (virbr0): bridge port virbr0-nic was detached
Nov 18 15:41:15 localhost.localdomain NetworkManager[1166]: <info>  (virbr0-nic): released from master virbr0
Nov 18 15:41:15 localhost.localdomain NetworkManager[1166]: <error> [1447854075.102269] [platform/nm-linux-platform.c:3653] do_change_link(): platform-linux: do-change-link[12]: failure changing link: netlink error (No such device, 31)
Nov 18 15:41:15 localhost.localdomain NetworkManager[1166]: <warn>  (virbr0-nic): failed to disable userspace IPv6LL address handling
Nov 18 15:41:15 localhost.localdomain libvirtd[1272]: Cannot get device virbr0-nic flags: No such device
Nov 18 15:41:15 localhost.localdomain libvirtd[1272]: Cannot get device virbr0-nic flags: No such device
Nov 18 15:41:15 localhost.localdomain libvirtd[1272]: Cannot get device virbr0-nic flags: No such device
Nov 18 15:41:15 localhost.localdomain libvirtd[1272]: Cannot get device virbr0-nic generic features: No such device



Version-Release number of selected component (if applicable):
libvirt-1.2.21-1.fc24.x86_64
virt-manager-1.2.1-3.fc24.noarch

How reproducible:
Always

Steps to Reproduce:
1. Try to add a NAT network via the UI
2.
3.

Actual results:
Traceback, network not added

Expected results:
Network is added.

Additional info:
The XML shown at the top of this log is missing the <bridge> and <mac> nodes. 

From another system I've taken the XML file and only modified the MAC address:

<network>
  <name>default</name>
  <uuid>28226a4a-3a8d-43b8-b7bc-f1515e755baa</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0'/>
  <mac address='52:54:00:77:cc:48'/>
  <domain name='default'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.128' end='192.168.122.254'/>
    </dhcp>
  </ip>
</network>


virsh net-define default.xml works fine with this file. 

I'm not sure which one is to blame: virt-manager for not providing the expected XML file or libvirt for not supplying the defaults.
Comment 1 Alexander Todorov 2015-11-18 09:01:42 EST
With the previously defined network:

# virsh net-start default
error: Failed to start network default
error: Unable to set bridge virbr0 forward_delay: Numerical result out of range


I guess the problem is probably in libvirt.
Comment 2 Daniel Berrange 2015-11-18 09:08:02 EST
Or it could be a kernel regression rejecting a parameter that was previously valid. What kernel do you have ?
Comment 3 Cole Robinson 2015-11-18 09:22:00 EST
Yes this is a kernel regression, tracked in 1279285

*** This bug has been marked as a duplicate of bug 1279285 ***

Note You need to log in before you can comment on or make changes to this bug.