Re: [PATCH 3/3] virNetServerRun: Notify systemd that we're accepting clients

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25.02.2014 16:18, Eric Blake wrote:
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@xxxxxxxxxx>
---
  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.


Not necessarily true. We already have:

BuildRequires: systemd-devel >= 185

in our spec file. So 'make rpm' will fail if the systemd-devel package is not installed.


+
+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.



Yes, this one is nasty.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]