Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 571084 - app-emulation/libvirt-1.3.0 Update libvirtd.init runscript to depend on mandatory service virtlogd
Summary: app-emulation/libvirt-1.3.0 Update libvirtd.init runscript to depend on manda...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthias Maier
URL: https://github.com/cardoe/gentoo/comm...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-06 14:42 UTC by Martin Dummer
Modified: 2016-02-28 05:37 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Dummer 2016-01-06 14:42:30 UTC
After upgrading to app-emulation/libvirt-1.3.0, all attempts to start a virtual machine (aka "domain") fail with the following error message:

virsh start FOO
error: Failed to start domain FOO
error: socket creation to '/var/run/libvirt/virtlogd-sock' failed: file or directory not found



The reason is described here:

https://bugzilla.redhat.com/show_bug.cgi?id=1290357  Comment #2

"libvirt 1.3.0 added a new mandatory service, virtlogd. so you'll need to enable that with service/systemctl first."

Solution: start service virtlogd before starting the first virtual machine / domain.

I propose to add a dependency into the libvirtd init file like "need virtlogd" (and similar for systemd" 
- or at least add a hint in "pkg_postinst" to remind the user starting virtlogd
Comment 1 Matthias Maier gentoo-dev 2016-01-06 20:32:03 UTC
> Solution: start service virtlogd before starting the first virtual machine /
> domain.

Just to clarify: Starting virtlogd in addition to the libvirtd service resolved the issue?

Thinks to do:

[ ] Update openrc runscript

     @Cardoe: I suggest we change the "use" dependency from virtlockd to a "need"
              dependency for virtlockd and virtlogd

[ ] Provide an update message in gentoo.readme: For systemd users it is necessary
    to enable the libvirtd.service unit again to also enable virtlogd.socket:

     # systemctl enable libvirtd.service
Comment 2 Martin Dummer 2016-01-06 23:13:55 UTC
(In reply to Matthias Maier from comment #1)
>
> Just to clarify: Starting virtlogd in addition to the libvirtd service
> resolved the issue?
> 

Yes, exactly.
Comment 3 Martin Dummer 2016-01-06 23:20:56 UTC
(In reply to Matthias Maier from comment #1)
> > Solution: start service virtlogd before starting the first virtual machine /


>      @Cardoe: I suggest we change the "use" dependency from virtlockd to a
> "need"
>               dependency for virtlockd and virtlogd

And just to clarify from my side: I did not say that virtlockd is NEEDED, only virtlogd is NEEDED. 
I did not notice virtlockd before today, it is not running on my notebook and so I assume it is not required (or NEEDED) to run domains with libvirtd. I think it is optional, and don't know in which way it is recommended for everyone using libvirtd.
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2016-01-07 03:33:51 UTC
Proposed fix plus some other updates.
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2016-01-07 03:34:06 UTC
I should note I didn't touch the systemd bits.
Comment 6 Matthias Maier gentoo-dev 2016-01-07 08:23:08 UTC
@cardoe: There is nothing to adjust in the systemd service files. (We ship the ones provided by upstream and they do the right thing™)

Thanks a lot for the patches and the maintenance bits. I've applied the commit from your branch.

I leave the bug open as a reminder that I should have a look at the systemd bits (whether virtlogd.socket is activated automatigally or needs user intervention).



commit c5f6db512e407f2957eb68a6801edcc555db4ac8
Author: Doug Goldstein <cardoe@gentoo.org>
Commit: Matthias Maier <tamiko@gentoo.org>

    app-emulation/libvirt: fix up service dependencies
    
    libvirtd requires virtlogd so this adds it as a 'need'. Change the other
    services to be on their own line to be a bit more clear in the future.
    Change failure to start due to missing directories into a test and create
    rather than failure.
    
    Gentoo-Bug: 571084
    
    Package-Manager: portage-2.2.26
    Signed-off-by: Doug Goldstein <cardoe@gentoo.org>
    Signed-off-by: Matthias Maier <tamiko@gentoo.org>