]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: improve error report when firewall chain creation fails
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 18 Mar 2019 17:31:21 +0000 (17:31 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 19 Mar 2019 09:54:52 +0000 (09:54 +0000)
commit9f4e35dc73ec9e940aa61bc7c140c2b800218ef3
tree6f8b70cf4961d14bca1aad3bd84b633f046167b9
parent7cd63604cf2bcf2231b6ca4ee5d29233d5caa23a
network: improve error report when firewall chain creation fails

During startup we create some top level chains in which all
virtual network firewall rules will be placed. The upfront
creation is done to avoid slowing down creation of individual
virtual networks by checking for chain existance every time.

There are some factors which can cause this upfront creation
to fail and while a message will get into the libvirtd log
this won't be seen by users who later try to start a virtual
network. Instead they'll just get a message saying that the
libvirt top level chain does not exist. This message is
accurate, but unhelpful for solving the root cause.

This patch thus saves any error during daemon startup and
reports it when trying to create a virtual network later.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/network/bridge_driver.c
src/network/bridge_driver_linux.c
src/network/bridge_driver_nop.c
src/network/bridge_driver_platform.h