Re: [PATCH 0/2] network: fix network driver to gracefully skip startup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 11, 2024 at 05:47:56PM GMT, Daniel P. Berrangé wrote:
> We should gracefully skip startup when:
>
>  * No network.conf firewall_backend is explicitly set, and
>    neither iptables/nftables are present
>  * Running unprivileged
>
> The former fixes libvirtd startup on non-Linux, or minimal linux
> installs without firewall tools.
>
> The latter skips pointless initialization that creates a driver
> that cannot do anything useful
>
> Daniel P. Berrangé (2):
>   network: skip network driver init if no firewall backend is present
>   network: don't attempt to initialize if non-privileged
>
>  src/network/bridge_driver.c      | 14 +++++++++++++-
>  src/network/bridge_driver_conf.c |  8 ++++----
>  2 files changed, 17 insertions(+), 5 deletions(-)

This makes things better, in that libvirtd doesn't completely fail to
start. However, we're still not handling the scenario quite
gracefully:

  $ PATH=/usr/bin virsh -c qemu:///session net-list
  error: Disconnected from qemu:///session due to end of file
  error: Failed to list networks
  error: End of file while reading data: Input/output error

libvirtd doesn't stick around after this, and existing sessions (if
any) get forcefully disconnected.

I think that having a proper null backend would allow us to handle
this better, by reporting driver initialization as successful and
only failing actual API calls.

-- 
Andrea Bolognani / Red Hat / Virtualization




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux