Bug 1577842 - RFE: make UNIX socket path configurable for virtlockd/virtlogd
Summary: RFE: make UNIX socket path configurable for virtlockd/virtlogd
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-14 09:10 UTC by mathieu.tarral
Modified: 2018-07-18 15:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description mathieu.tarral 2018-05-14 09:10:10 UTC
Description of problem:

Compile and install libvirt in $HOME/usr

If you edit /etc/libvirt/libvirtd.conf to set 
unix_sock_dir = "/var/run/libvirt",

virLogManagerDaemonPath() will not read the configuration file, and still try to connect to LOCALSTATEDIR/run/libvirt/virtlogd-sock, which is wrong.


Version-Release number of selected component (if applicable):
3.0.0

How reproducible:
always


Steps to Reproduce:
1. compile and install libvirt 3.0.0 to $HOME/usr
2. edit $HOME/usr/etc/libvirt/libvirtd.conf, and set /run/libvirt/virtlogd-sock
3. run $HOME/usr/sbin/libvirtd
4. run $HOME/usr/sbin/virtlogd
4. try to start a VM

Actual results:
It fails because libvirt tries to connect to the wrong socket path.

Expected results:
libvirt should connect to /var/run/libvirt/virtlogd-sock

Additional info:
Discussed on the mailing list with Martin Kletzander.

Could you provide a fix ?
I don't really have the time to learn how to contribute to libvirt.

Thanks !

Comment 1 Daniel Berrangé 2018-05-14 09:30:51 UTC
Err, if you've set configure --prefix  to install into $HOME/user, then /etc/libvirt/libvirtd.conf is no longer the right path.

Unless you set an explicit --sysconfdir=/etc arg to configure, the right config file is going to be $HOME/usr/etc/libvirt/libvirtd.conf

Comment 2 mathieu.tarral 2018-05-14 10:24:32 UTC
Hi Daniel,

There is a word missing here in my initial report:

> If you edit /etc/libvirt/libvirtd.conf to set 
> unix_sock_dir = "/var/run/libvirt",

should be

If you edit $HOME/usr/etc/libvirt/libvirtd.conf to set 
unix_sock_dir = "/var/run/libvirt",

As you said:
> the right config file is going to be $HOME/usr/etc/libvirt/libvirtd.conf
yes, and the bug is that  virLogManagerDaemonPath() doesn't read this config file to get the unix_sock_dir location.

Is this more clear ?
Thanks.

Comment 3 Daniel Berrangé 2018-05-14 10:48:33 UTC
Note that the libvirtd.conf file is only for configuring libvirtd daemon - it has no impact on virtlogd or virtlockd, which have their own configuration files.

Now, neither virtlogd.conf or virtlockd.conf support changing unix_sock_dir right now, so that would be an RFE.

If we make those paths configurable, we'll also need another config file option to set the path for the client to use, as those config files are both for the server side.


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