Skip to content
Snippets Groups Projects
Commit 715bfc5e authored by Michal Privoznik's avatar Michal Privoznik
Browse files

remote_daemon: Silence DBus errors

When a daemon (like libvirtd, virtqemud, etc.) is started as an
unprivileged user (which is exactly how KubeVirt does it), then
it tries to register on both session and system DBus-es so that
it can shut itself down (e.g. when system is powering off or user
logs out). It's worth noting that this is just opportunistic and
if no DBus is available then no error is reported.

Or at least that's what we thought. Because the way our
virGDBusGetSessionBus() and virGDBusGetSystemBus() are written an
error is actually reported every time the daemon starts.

Use virGDBusHasSessionBus() and virGDBusHasSystemBus() to check
if corresponding bus is available.

Resolves: https://issues.redhat.com/browse/RHEL-79088


Signed-off-by: default avatarMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: default avatarAndrea Bolognani <abologna@redhat.com>
parent 0428c69b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment