Bug 1588288 - libvirt systemd unit file issue
Summary: libvirt systemd unit file issue
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-07 03:21 UTC by Toolybird
Modified: 2018-06-12 17:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-12 17:30:39 UTC
Embargoed:


Attachments (Terms of Use)
journal sample (1.51 KB, text/plain)
2018-06-07 03:21 UTC, Toolybird
no flags Details

Description Toolybird 2018-06-07 03:21:18 UTC
Created attachment 1448577 [details]
journal sample

Description of problem:
libvirtd starts up before systemd-logind.service has finished loading resulting in spurious messages in journal as per below:

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

How reproducible:
Not always, but currently averaging every second boot

While setting up a new Ryzen 2700X box with Arch I'm seeing these minor errors / warnings in the journal:

error : virNodeSuspendSupportsTarget:336 : internal error: Cannot probe for supported suspend types
warning : virQEMUCapsInit:949 : Failed to get host power management capabilities

(log with more context is attached)

1. This must be a timing issue as it doesn't happen every boot
2. This system being quite fast helps trigger the issue

The following systemd "drop-in" completely solves the problem for me:

[Unit]
After=systemd-logind.service

I'm not sure if this is a correct fix, but please consider.

Comment 1 Cole Robinson 2018-06-07 14:50:04 UTC
Yes that looks like the correct fix, thanks!

Want to send a patch? The file is src/remote/libvirtd.service.in in git://libvirt.org/libvirt.git , patches go to libvir-list. This commit is similar: https://libvirt.org/git/?p=libvirt.git;a=commit;h=1b0c42ff7af3026b7986f81989dece0da53c8b5d

Comment 2 Cole Robinson 2018-06-12 13:48:24 UTC
I sent a patch upstream: https://www.redhat.com/archives/libvir-list/2018-June/msg00954.html

Comment 3 Cole Robinson 2018-06-12 17:30:39 UTC
Fixed upstream now:

commit 9f1b1194b031d528f4b376371282ed61279165b0
Author: Cole Robinson <crobinso>
Date:   Thu Jun 7 10:44:34 2018 -0400

    libvirtd: Add service dependency on systemd-logind


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