On 02/21/2014 05:32 AM, Michal Privoznik wrote:
Systemd does not forget about the cases, where client service needs
to
wait for daemon service to initialize and start accepting new clients.
Setting a dependency in client is not enough as systemd doesn't know
when the daemon has initialized itself and started accepting new
clients. However, it offers a mechanism to solve this. The daemon needs
to call a special systemd function by which the daemon tells "I'm ready
to accept new clients". This is exactly what we need with
libvirtd-guests (client) and libvirtd (daemon). So now, with this
change, libvirt-guests.service is invoked not any sooner than
libvirtd.service calls the systemd notify function.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
configure.ac | 2 ++
daemon/libvirtd.service.in | 1 +
m4/virt-systemd-daemon.m4 | 34 ++++++++++++++++++++++++++++++++++
src/Makefile.am | 4 ++--
src/libvirt_private.syms | 1 +
src/rpc/virnetserver.c | 7 +++++++
src/util/virsystemd.c | 12 ++++++++++++
src/util/virsystemd.h | 2 ++
8 files changed, 61 insertions(+), 2 deletions(-)
create mode 100644 m4/virt-systemd-daemon.m4
Adds a new configure option, but doesn't change the spec file. This is
bad, because it means that someone doing 'make rpm' now has an
indeterminate behavior based on whether they have the library installed.
We need a followup patch.
+
+AC_DEFUN([LIBVIRT_CHECK_SYSTEMD_DAEMON],[
+ LIBVIRT_CHECK_PKG([SYSTEMD_DAEMON], [libsystemd-daemon], [0.27.1])
Ouch - this results in:
$ ./configure --help | grep daemon
--with-systemd_daemon with libsystemd-daemon (>= 0.27.1) support
which violates configure conventions of spelling all options with '-'
instead of '_'. I'll prepare a followup for that.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org