Bug 1889363 - virt-who's systemd unit is missing 'libvirtd-ro.socket' requirement
Summary: virt-who's systemd unit is missing 'libvirtd-ro.socket' requirement
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: virt-who
Version: 8.2
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.5
Assignee: candlepin-bugs
QA Contact: Eko
Depends On:
Blocks: 1878724
TreeView+ depends on / blocked
Reported: 2020-10-19 13:29 UTC by Marcin Sobczyk
Modified: 2020-11-14 05:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

Description Marcin Sobczyk 2020-10-19 13:29:16 UTC
Description of problem:

virt-who uses libvirtd's read-only socket to connect to the daemon [1], but it doesn't require it at systemd unit level [2]. This causes scenarios where one needs to put down whole libvirtd daemon with all its sockets unpredictable.

How reproducible: Always

Steps to Reproduce:

 systemctl stop libvirt-who.service libvirtd-ro.socket libvirtd.service
 systemctl start libvirt-who.service

The service is active, but it reports errors in log:

 libvirt.libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock-ro': Connection refused


 systemctl status libvirtd-ro.socket

shows that the socket is indeed stopped.

The opposite is also true - when both virt-who and libvirtd are running, this:

 systemctl stop libvirtd.service libvirtd-ro.socket

should also stop virt-who, but it doesn't.

Expected results:

Starting virt-who.service should start libvirtd-ro.socket automatically and stopping libvirtd-ro.socket should stop virt-who.service.

[1] https://github.com/candlepin/virt-who/blob/4c7fdb032a66e2fe3324cc2d7579101c699e3b00/virtwho/virt/libvirtd/libvirtd.py#L282
[2] https://github.com/candlepin/virt-who/blob/master/virt-who.service

Note You need to log in before you can comment on or make changes to this bug.