Public bug reported:

If a libvirt network is set to autostart and upon boot there is an issue
starting the network, the file located at
/run/libvirt/network/autostarted is not removed. Thus, the network will
never autostart again if the libvirt service is restarted. This was
observed due to the network being a SRIOV interface and the VFs were not
created before libvirt tried to autostart the network. However, even
after the VFs are created, the network won't autostart upon restarting
the service but will start with 'virsh net-start'. If you delete the
file and restart the service then it works as intended.


Here is an example of the debug log:

2025-01-16 19:54:15.201+0000: 2537: debug : virDriverShouldAutostart:99 : 
Autostart file /run/libvirt/network/autostarted does not exist, do autostart
2025-01-16 19:54:15.201+0000: 2537: debug : networkStartNetwork:2305 : 
driver=0x7f9f800246e0, network=0x7f9f80014d00
2025-01-16 19:54:15.201+0000: 2537: debug : networkStartNetwork:2313 : 
Beginning network startup process
2025-01-16 19:54:15.202+0000: 2537: debug : networkStartNetwork:2317 : Setting 
current network def as transient
2025-01-16 19:54:15.202+0000: 2537: debug : virPCIGetVirtualFunctionsFull:2403 
: Found 0 virtual functions for /sys/class/net/ens35f1/device
2025-01-16 19:54:15.202+0000: 2537: error : networkCreateInterfacePool:2250 : 
internal error: No usable Vf's present on SRIOV PF ens35f1
2025-01-16 19:54:15.202+0000: 2537: info : networkShutdownNetwork:2405 : 
Shutting down network 'n0_eth1'


There should be a failback mechanism that removes the 
/run/libvirt/network/autostarted file if an error is encountered.


lsb_release -rd
Description:    Ubuntu 22.04.3 LTS
Release:        22.04


dpkg -l | grep libvirt
ii  libvirt-clients                        8.0.0-1ubuntu7.10                    
   amd64        Programs for the libvirt library
ii  libvirt-daemon                         8.0.0-1ubuntu7.10                    
   amd64        Virtualization daemon
ii  libvirt-daemon-config-network          8.0.0-1ubuntu7.10                    
   all          Libvirt daemon configuration files (default network)
ii  libvirt-daemon-config-nwfilter         8.0.0-1ubuntu7.10                    
   all          Libvirt daemon configuration files (default network filters)
ii  libvirt-daemon-driver-qemu             8.0.0-1ubuntu7.10                    
   amd64        Virtualization daemon QEMU connection driver
ii  libvirt-daemon-system                  8.0.0-1ubuntu7.10                    
   amd64        Libvirt daemon configuration files
ii  libvirt-daemon-system-systemd          8.0.0-1ubuntu7.10                    
   all          Libvirt daemon configuration files (systemd)
ii  libvirt-glib-1.0-0:amd64               4.0.0-2                              
   amd64        libvirt GLib and GObject mapping library
ii  libvirt-glib-1.0-data                  4.0.0-2                              
   all          Common files for libvirt GLib library
ii  libvirt0:amd64                         8.0.0-1ubuntu7.10                    
   amd64        library for interfacing with different virtualization systems
ii  python3-libvirt                        8.0.0-1build1                        
   amd64        libvirt Python 3 bindings

** Affects: libvirt (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2095127

Title:
  The file in /run/libvirt/network/autostarted isn't removed if
  autostart fails.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/2095127/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to