xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/15] xen: add systemd support
@ 2014-04-30  1:11 Luis R. Rodriguez
  2014-04-30  1:11 ` [PATCH v4 01/15] xenstore: add support for a retry open limit on xenstored Luis R. Rodriguez
                   ` (16 more replies)
  0 siblings, 17 replies; 84+ messages in thread
From: Luis R. Rodriguez @ 2014-04-30  1:11 UTC (permalink / raw)
  To: xen-devel; +Cc: Luis R. Rodriguez

From: "Luis R. Rodriguez" <mcgrof@suse.com>

This is my 4th series which I addresses all feedback from the
first 3 series on adding systemd support into xen. I've taken
things a bit further, I've been avoiding autoconf but in the end
that proved to provide the best solution. Additionally not
originally understanding systemd's socket stuff prompted me to
look into that and decided its best to just switch to active sockets
for systemd [0] intregration for both censtored and oxenstored. I've
also decided its best to avoid separate service files for the
two daemons given that we can do this cleanly with autoconf.

I've run time tested this against today's tip against the
upstream kernel, on OpenSUSE using both censtored and oxenstored.

To build you can use either of with the default preferring
oxenstored if ocaml tools are present:

./configure --with-xenstored=cxenstored --enable-systemd
./configure --with-xenstored=oxenstored --enable-systemd

Systems should just have to:

systemctl enable xenstored.socket

And then anything that will tickle the sockets:

/var/run/xenstored/socket
/var/run/xenstored/socket_ro

will trigger either censtored or oxenstored to activate. This
example suffices:

nc -U /var/run/xenstored/socket_ro

This example also happens to test the order of supply / demand
of sockets through sytsemd's active socket mechanism and our
integration to do this in order. Sine we cannot currently stop
the xenstore this means we cannot take advantage of dynamically
switching xensrores live, but if that is fixed we should be able
to dynamically swap even the different types of xenstore on a
live system or just upgrade the xenstore without a reboot.

The ordering of active sockets implementation is begging to be
shared with a common small library but given that xc / xl are
not specific to the xenstore it would be pointless to stuff and
duplicate code for both in there. Both the cxenstore and oxenstored
handle their own store access on their own, if there's a desire to
unify that small piece of code we should consider other things to
stuff on it. For now this goes separately.

Systemd autconf support was split out as much as possible from
xen to make it useful for any other project, perhaps this can
go upstream to systemd.

Ocaml lacks support for systemd and as such I needed to extend
oxenstored support through a small stub for access to systemd.
System'd sd_listen_fds() can technically easily be implemented
in ocaml *but* given that FD_CLOEXEC support through the new
Unix.set_cloexec is only available on 4.00.1+dev which isn't
yet widely available I decided agianst this, this lets
systemd take care of FD_CLOEXEC for us. Proper support for
systemd should instead in the end be merged upstream into
ocaml, but who knows when that will happen.

Given the slew of autoconf updates to xen I only provide an
autogen.sh update after the last change to make things easier
to review.

[0] http://0pointer.de/blog/projects/socket-activation2.html
[1] http://caml.inria.fr/mantis/view.php?id=5569

Luis R. Rodriguez (15):
  xenstore: add support for a retry open limit on xenstored
  xencommons: use the retry limit instead of implementing our own
    timeout
  xenstored: enable usage of config.h on both xenstored and oxenstored
  cxenstored: add support for systemd active sockets
  oxenstored: add support for systemd active sockets
  tools/xendomains: make xl the default
  tools/xendomains: do space cleanups
  tools/xendomains: move to libexec and use a smaller init helper
  autoconf: xen: force a refresh with autoconf
  autoconf: update m4/pkg.m4
  autoconf: xen: move standard variables to a generic place
  autoconf: xen: peg the xenstored preference onto the top level config
  systemd: add xen systemd service and module files
  autoconf: xen: add systemd support into the build system
  autoconf: xen: trigger an update with autogen.sh

 .gitignore                                         |    7 +
 Config.mk                                          |   13 -
 Makefile                                           |   11 +-
 autogen.sh                                         |    8 +-
 config/StdGNU.mk                                   |   19 +-
 config/Tools.mk.in                                 |    6 +
 config/Toplevel.mk.in                              |   27 +
 config/xen-environment-header.in                   |   16 +
 config/xen-environment-scripts.in                  |   18 +
 configure                                          | 2396 ++++++++++++++++-
 configure.ac                                       |   10 +-
 docs/man/xenstore.pod.1                            |    7 +-
 m4/expand_config.m4                                |  122 +
 m4/pkg.m4                                          |   88 +-
 m4/pkg.m4.README                                   |   21 +
 m4/systemd.m4                                      |  105 +
 stubdom/Makefile                                   |   17 +-
 stubdom/configure                                  | 2390 +++++++++++++++++
 stubdom/configure.ac                               |    4 +
 tools/config.h.in                                  |    3 +
 tools/configure                                    | 2815 +++++++++++++++++++-
 tools/configure.ac                                 |   29 +-
 tools/hotplug/Linux/Makefile                       |   14 +-
 tools/hotplug/Linux/init.d/xencommons              |   25 +-
 tools/hotplug/Linux/init.d/xendomains              |  567 +---
 tools/hotplug/Linux/systemd/Makefile               |   44 +
 tools/hotplug/Linux/systemd/proc-xen.mount.in      |    9 +
 .../Linux/systemd/var-lib-xenstored.mount.in       |   13 +
 .../systemd/xen-qemu-dom0-disk-backend.service.in  |   22 +
 .../hotplug/Linux/systemd/xen-watchdog.service.in  |   13 +
 .../Linux/systemd/xen.conf.modules-load.d.in       |   16 +
 tools/hotplug/Linux/systemd/xenconsoled.service.in |   20 +
 tools/hotplug/Linux/systemd/xendomains.service.in  |   16 +
 tools/hotplug/Linux/systemd/xenstored.service.in   |   25 +
 tools/hotplug/Linux/systemd/xenstored.socket.in    |    9 +
 tools/hotplug/Linux/xendomains                     |  585 ++++
 tools/hotplug/common/Makefile                      |    7 +-
 tools/libxl/Makefile                               |   11 +-
 tools/ocaml/xenstored/Makefile                     |   15 +-
 tools/ocaml/xenstored/systemd.ml                   |   16 +
 tools/ocaml/xenstored/systemd.mli                  |   21 +
 tools/ocaml/xenstored/systemd_stubs.c              |  166 ++
 tools/ocaml/xenstored/utils.ml                     |   21 +-
 tools/python/Makefile                              |    6 +-
 tools/xenstore/Makefile                            |    7 +
 tools/xenstore/xenstore_client.c                   |   40 +-
 tools/xenstore/xs.c                                |  127 +
 47 files changed, 9267 insertions(+), 680 deletions(-)
 create mode 100644 config/xen-environment-header.in
 create mode 100644 config/xen-environment-scripts.in
 create mode 100644 m4/expand_config.m4
 create mode 100644 m4/pkg.m4.README
 create mode 100644 m4/systemd.m4
 create mode 100644 tools/hotplug/Linux/systemd/Makefile
 create mode 100644 tools/hotplug/Linux/systemd/proc-xen.mount.in
 create mode 100644 tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in
 create mode 100644 tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
 create mode 100644 tools/hotplug/Linux/systemd/xen-watchdog.service.in
 create mode 100644 tools/hotplug/Linux/systemd/xen.conf.modules-load.d.in
 create mode 100644 tools/hotplug/Linux/systemd/xenconsoled.service.in
 create mode 100644 tools/hotplug/Linux/systemd/xendomains.service.in
 create mode 100644 tools/hotplug/Linux/systemd/xenstored.service.in
 create mode 100644 tools/hotplug/Linux/systemd/xenstored.socket.in
 create mode 100644 tools/hotplug/Linux/xendomains
 create mode 100644 tools/ocaml/xenstored/systemd.ml
 create mode 100644 tools/ocaml/xenstored/systemd.mli
 create mode 100644 tools/ocaml/xenstored/systemd_stubs.c

-- 
1.9.0

^ permalink raw reply	[flat|nested] 84+ messages in thread

end of thread, other threads:[~2014-05-15  9:02 UTC | newest]

Thread overview: 84+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-30  1:11 [PATCH v4 00/15] xen: add systemd support Luis R. Rodriguez
2014-04-30  1:11 ` [PATCH v4 01/15] xenstore: add support for a retry open limit on xenstored Luis R. Rodriguez
2014-05-07 15:03   ` Ian Campbell
2014-05-12 13:50   ` Ian Jackson
2014-05-12 14:18     ` Ian Campbell
2014-05-12 14:40       ` Jacek Konieczny
2014-05-12 15:37         ` Ian Jackson
2014-05-12 18:59           ` Luis R. Rodriguez
2014-05-13 21:33           ` Luis R. Rodriguez
2014-04-30  1:11 ` [PATCH v4 02/15] xencommons: use the retry limit instead of implementing our own timeout Luis R. Rodriguez
2014-04-30  9:33   ` Andrew Cooper
2014-04-30 16:36     ` Luis R. Rodriguez
2014-05-07 15:05   ` Ian Campbell
2014-04-30  1:11 ` [PATCH v4 03/15] xenstored: enable usage of config.h on both xenstored and oxenstored Luis R. Rodriguez
2014-05-07 15:06   ` Ian Campbell
2014-04-30  1:11 ` [PATCH v4 04/15] cxenstored: add support for systemd active sockets Luis R. Rodriguez
2014-05-07 15:18   ` Ian Campbell
2014-05-07 15:46   ` Ian Campbell
2014-05-13 22:17     ` Luis R. Rodriguez
2014-05-14  8:44       ` Ian Campbell
2014-05-15  1:50         ` Luis R. Rodriguez
2014-04-30  1:11 ` [PATCH v4 05/15] oxenstored: " Luis R. Rodriguez
2014-04-30  8:35   ` Dave Scott
2014-04-30 17:30     ` Luis R. Rodriguez
2014-05-01 10:21       ` Dave Scott
2014-04-30  9:27   ` Anil Madhavapeddy
2014-04-30 17:35     ` Luis R. Rodriguez
2014-05-01  9:16       ` Anil Madhavapeddy
2014-05-07 15:20   ` Ian Campbell
2014-05-12 19:09     ` Luis R. Rodriguez
2014-05-12 13:57   ` Ian Jackson
2014-05-12 18:11     ` Luis R. Rodriguez
2014-05-13  8:53       ` Ian Campbell
2014-04-30  1:11 ` [PATCH v4 06/15] tools/xendomains: make xl the default Luis R. Rodriguez
2014-04-30  7:02   ` Olaf Hering
2014-04-30 17:43     ` Luis R. Rodriguez
2014-05-07 15:21       ` Ian Campbell
2014-04-30  1:12 ` [PATCH v4 07/15] tools/xendomains: do space cleanups Luis R. Rodriguez
2014-04-30  1:12 ` [PATCH v4 08/15] tools/xendomains: move to libexec and use a smaller init helper Luis R. Rodriguez
2014-05-07 15:24   ` Ian Campbell
2014-05-13 22:21     ` Luis R. Rodriguez
2014-04-30  1:12 ` [PATCH v4 09/15] autoconf: xen: force a refresh with autoconf Luis R. Rodriguez
2014-05-07 15:25   ` Ian Campbell
2014-05-07 16:12   ` Roger Pau Monné
2014-05-07 16:21     ` Ian Campbell
2014-05-07 16:44       ` Roger Pau Monné
2014-05-07 18:28         ` Luis R. Rodriguez
2014-05-12 14:00           ` Ian Jackson
2014-05-12 18:14             ` Luis R. Rodriguez
2014-04-30  1:12 ` [PATCH v4 10/15] autoconf: update m4/pkg.m4 Luis R. Rodriguez
2014-05-07 15:28   ` Ian Campbell
2014-05-13 22:32     ` Luis R. Rodriguez
2014-05-07 16:17   ` Roger Pau Monné
2014-04-30  1:12 ` [PATCH v4 11/15] autoconf: xen: move standard variables to a generic place Luis R. Rodriguez
2014-04-30  6:52   ` Jan Beulich
     [not found]   ` <5360B9CB020000780000D9BB@suse.com>
2014-04-30 17:53     ` Luis R. Rodriguez
2014-05-02  8:12       ` Jan Beulich
2014-05-13 23:03         ` Luis R. Rodriguez
2014-04-30  1:12 ` [PATCH v4 12/15] autoconf: xen: peg the xenstored preference onto the top level config Luis R. Rodriguez
2014-05-07 15:32   ` Ian Campbell
2014-05-13 23:05     ` Luis R. Rodriguez
2014-04-30  1:12 ` [PATCH v4 13/15] systemd: add xen systemd service and module files Luis R. Rodriguez
2014-05-07 15:46   ` Ian Campbell
2014-05-12 18:22     ` Luis R. Rodriguez
2014-05-13 23:28     ` Luis R. Rodriguez
2014-05-12 14:11   ` Ian Jackson
2014-05-12 14:32     ` Jacek Konieczny
2014-05-12 15:36       ` Ian Jackson
2014-05-12 18:55         ` Luis R. Rodriguez
2014-05-12 18:46     ` Luis R. Rodriguez
2014-05-13  8:57       ` Ian Campbell
2014-04-30  1:12 ` [PATCH v4 14/15] autoconf: xen: add systemd support into the build system Luis R. Rodriguez
2014-05-07 16:40   ` Roger Pau Monné
2014-05-15  1:58     ` Luis R. Rodriguez
2014-05-15  9:02       ` Ian Campbell
2014-04-30  1:12 ` [PATCH v4 15/15] autoconf: xen: trigger an update with autogen.sh Luis R. Rodriguez
2014-05-07 15:47   ` Ian Campbell
2014-05-07 18:34     ` Luis R. Rodriguez
2014-05-08  8:42       ` Ian Campbell
2014-04-30  1:15 ` [PATCH v4 00/15] xen: add systemd support Luis R. Rodriguez
2014-05-07 15:18   ` Ian Campbell
2014-05-08 11:28 ` Anthony PERARD
2014-05-15  2:12   ` Luis R. Rodriguez
2014-05-15  6:14   ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).