]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: Suppress reporting an error when D-Bus is unavailable in networkStateInitial...
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 10 Apr 2025 08:42:55 +0000 (10:42 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 10 Apr 2025 11:22:43 +0000 (13:22 +0200)
commitac5874ba8771d9f83ddc9cbd67606f3b0964c102
treef3a6886247ac1f6537fb3913540d6370a3411a29
parent4f502feebfcad5ed647a87d5b33228bf63aadbb0
network: Suppress reporting an error when D-Bus is unavailable in networkStateInitialize()

When the network driver initializes itself, it tries to subscribe
to signals from Firewalld sent over system D-Bus. Well, the code
is written in best effort mode, i.e. lack of D-Bus is not
considered an error. Problem is, virGDBusGetSystemBus() which is
used to obtain system D-Bus prints out an error in case of
lacking system D-Bus. This pollutes the logs (which may mislead
users) and goes against the best-effort nature of aforementioned
code. Check for the system D-Bus presence via
virGDBusHasSystemBus() first.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/network/bridge_driver.c