Bug 1314881
| Summary: | libvirtd.service in a continuous restart loop if systemd compat libraries are not present (systemd>v229 and archlinux) | ||
|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | Richard Tollerton <rich.tollerton> |
| Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | agx, berrange, crobinso, dr4ke, dyuan, jtomko, pupykin.s, rbalakri, rich.tollerton, yafu |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-06-07 08:55:27 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Richard Tollerton
2016-03-04 18:09:58 UTC
We should just ditch use of sd_notify and not link to any systemd library. It is trivial to implementation the notification in libvirt directly - its just a matter of connecting to the UNIX socket path from $NOTIFY_SOCKET env var and sending the string "READY=1". Sure... because systemd has never broken compatibility in the past, right? ;) Annoying though it is, libvirt probably gains some abstraction benefit out of delegating this work to sd_notify, and if/when they deprecate that API in the future, the issue would manifest itself as a build failure, when otherwise (by hand-stuffing the socket) it would be altogether harder to diagnose. CCing the debian maintainer guido, comment #0 mentions https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779775 as a fix, sounds like arch wants this too so maybe we find a way to get it upstream? (but I might be missing the details) We're linking against libsystemdaemon since some time in Debian:
https://anonscm.debian.org/cgit/pkg-libvirt/libvirt.git/tree/debian/patches/debian/libsystemd.patch
I did not get around to clean this up to link against either libsystemd-daemon yet.
Now pushed upstream:
commit c0bc172383c2c955394589e5808457935ae06f1d
Author: Daniel P. Berrange <berrange>
AuthorDate: 2016-06-06 15:03:27 +0100
Commit: Daniel P. Berrange <berrange>
CommitDate: 2016-06-07 09:37:57 +0100
systemd: directly notify systemd instead of using sd_notify
The sd_notify method is used to tell systemd when libvirtd
has finished starting up. All it does is send a datagram
containing the string parameter to systemd on a UNIX socket
named in the NOTIFY_SOCKET environment variable. Rather than
pulling in the systemd libraries for this, just code the
notification directly in libvirt as this is a stable ABI
from systemd's POV which explicitly allows independant
implementations:
See "Reimplementable Independently" column in the
"$NOTIFY_SOCKET Daemon Notifications" row:
https://www.freedesktop.org/wiki/Software/systemd/InterfacePortabilityAndStabilityChart/
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1314881
Signed-off-by: Daniel P. Berrange <berrange>
git describe: v1.3.5-11-gc0bc172
|