From: Ian Campbell <ian.campbell@citrix.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
"Luis R. Rodriguez" <mcgrof@suse.com>,
Wei Liu <Wei.Liu2@citrix.com>,
"Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Subject: Re: [PATCH v7 2/8] cxenstored: add support for systemd active sockets
Date: Wed, 5 Aug 2015 12:11:35 +0100 [thread overview]
Message-ID: <1438773095.9747.64.camel@citrix.com> (raw)
In-Reply-To: <CAFLBxZanbzdNUFOeeUkGw+6mNk-9dL+1uV06ddRVzgHNFvFZyw@mail.gmail.com>
On Wed, 2015-08-05 at 11:56 +0100, George Dunlap wrote:
> On Wed, Aug 5, 2015 at 11:17 AM, Ian Campbell <ian.campbell@citrix.com>
> wrote:
> > On Wed, 2015-08-05 at 11:06 +0100, George Dunlap wrote:
> > > On Fri, Jul 18, 2014 at 12:28 AM, Luis R. Rodriguez
> > > <mcgrof@do-not-panic.com> wrote:
> > > > From: "Luis R. Rodriguez" <mcgrof@suse.com>
> > > >
> > > > This adds systemd socket activation support for the C xenstored.
> > > > Active sockets enable xenstored to be loaded only if required by a
> > > > system
> > > > onto which Xen is installed on. Socket activation is handled by
> > > > systemd, once a port for a service which claims a socket is used
> > > > systemd will start the required services for it, on demand. For
> > > > more
> > > > details on socket activation refer to Lennart's socket-activation
> > > > post regarding this [0].
> > > >
> > > > Right now this code adds a no-op for this functionality, leaving
> > > > the
> > > > enablement to be done later once systemd is properly hooked into
> > > > the build system. The socket activation is ordered in aligment with
> > > > the socket activation order passed on to systemd.
> > > >
> > > > [0] http://0pointer.de/blog/projects/socket-activation2.html
> > >
> > > So with this patch in place, xenstored will not start on a system
> > > that
> > > has systemd, *even if it wasn't started from systemd*.
> >
> > But where systemd is /sbin/init, right?
> >
> > The case where xenstored was compiled with systemd support but systemd
> > is
> > not /sbin/init should still be expected to work, and isn't what I think
> > you
> > are complaining about here.
> >
> > > Lots of systems (e.g., CentOS 7) have legacy systems in place to
> > > allow
> > > you to do things like "chkconfig --add xencommons" even on a systemd
> > > system. I think we still want to work with those, right?
> >
> > Isn't chkconfig --add still arranging for the thing to be started by
> > systemd under the hood? If not systemd on a host where
> > /sbin/init==systemd
> > then what does else would start it?
> >
> > If you are asking "should the sysvinit initscripts still be us(ed|able)
> > even though systemd is being used as /sbin/init on the host and a unit
> > file
> > is present" then AIUI the systemd answer is "no". (We may choose to
> > disagree with systemd on this I suppose)
>
> Well that's not (apparently) the RHEL answer; doing "chkconfig --add
> [foo]" Just Works on CentOS 7 for all the sysvinit scripts I've used
> (including the Xen 4.4 Xen4CentOS packages).
I would expect that the CentOS 7 packaging guidelines would
require/encourage you to use the systemd unit files (via whatever command
that is) in preference to the sysvinit initscripts when they are available.
AUIU the compatibility works the other way round, which is if you use the
new systemd commands and there is no unit file with that name but there is
a sysv initscript with that name then systemd will invoke the initscript in
a compatibility mode.
I'm a bit surprised that chkconfig doesn't just to the right thing. It's
possible that the fact that our initscript and our systemd unitfiles do not
share the same names has defeated its heuristics.
> I think we want to still *enable* people to use that mode if they want
> to. But I won't argue if people feel strongly otherwise.
>
> > On the other hand, does this mean I can no longer start xenstored by
> > hand
> > from the CLI? _That_ would seem to be worth preserving, for debugging
> > etc
> > if nothing else.
>
> So what happens at the moment is that xenstored, run either from the
> command-line says, "Oh, look! I'm running on a systemd system. I'll
> check for my systemd sockets. Oh no, no sockets! *dies*".
This shouldn't happen...
> If run from xencommons, it doesn't even get that far: it says, "Oh,
> look! I'm running on a systemd system. But wait! You asked me to use
> a pidfile! BAD USER! NO PIDFILE ON SYSTEMD! *dies*".
This isn't strictly speaking what we want people to be doing (they should
use the systemd units), but I think by properly fixing the first issue this
will make this start working too.
> Modifying xenstored to try to open the systemd sockets, and fall back
> to normal sockets if it doesn't find any, works when started from the
> command-line. But for some reason, if you take out the aforementioned
> check preventing --pid-file, it still segfaults (!) at some point. I
> haven't tracked down what the problem is there yet; but I don't want
> to bother trying if that's not what we're going for. :-)
I think the check for socket activation should be gated on a new command
line option as well as the presence of systemd, and the systemd unit file
should pass that option. Then invoking from the CLI works.
Ian.
next prev parent reply other threads:[~2015-08-05 11:11 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-17 23:28 [PATCH v7 0/8] xen: add systemd support Luis R. Rodriguez
2014-07-17 23:28 ` [PATCH v7 1/8] xenstored: enable usage of config.h on both xenstored and oxenstored Luis R. Rodriguez
2014-07-17 23:28 ` [PATCH v7 2/8] cxenstored: add support for systemd active sockets Luis R. Rodriguez
2014-07-24 15:10 ` Ian Campbell
2014-07-24 15:54 ` Ian Campbell
2014-07-25 22:45 ` Luis R. Rodriguez
2014-07-28 9:48 ` Ian Campbell
2014-07-28 15:06 ` Luis R. Rodriguez
2015-08-05 10:06 ` George Dunlap
2015-08-05 10:17 ` Ian Campbell
2015-08-05 10:56 ` George Dunlap
2015-08-05 11:11 ` Ian Campbell [this message]
2015-08-05 11:14 ` Ian Campbell
2015-08-05 11:21 ` George Dunlap
2015-08-05 11:27 ` Ian Campbell
2015-08-05 13:17 ` Wei Liu
2015-08-05 16:30 ` George Dunlap
2015-08-05 17:24 ` Wei Liu
2015-08-05 18:19 ` Wei Liu
2015-08-06 9:13 ` Ian Campbell
2015-08-06 9:20 ` Wei Liu
2015-08-06 9:29 ` Ian Campbell
2015-08-06 9:36 ` Wei Liu
2015-08-06 10:17 ` Wei Liu
2015-08-06 10:48 ` Ian Campbell
2015-08-06 10:56 ` Wei Liu
2015-08-06 11:03 ` Ian Campbell
2015-08-06 13:56 ` George Dunlap
2014-07-17 23:28 ` [PATCH v7 3/8] oxenstored: " Luis R. Rodriguez
2014-07-17 23:28 ` [PATCH v7 4/8] oxenstored: force FD_CLOEXEC with Unix.set_close_on_exec on LSB init Luis R. Rodriguez
2014-07-24 15:09 ` Ian Campbell
2014-07-17 23:28 ` [PATCH v7 5/8] autoconf: xen: move standard path variables to config/Paths.mk.in Luis R. Rodriguez
2014-07-24 15:29 ` Ian Campbell
2014-07-17 23:28 ` [PATCH v7 6/8] xencommons: move module list into a generic place Luis R. Rodriguez
2014-07-24 15:35 ` Ian Campbell
2014-07-25 23:16 ` Luis R. Rodriguez
2014-07-17 23:28 ` [PATCH v7 7/8] autoconf: xen: enable explicit preference option for xenstored preference Luis R. Rodriguez
2014-07-24 15:40 ` Ian Campbell
2014-07-25 23:25 ` Luis R. Rodriguez
2014-07-17 23:28 ` [PATCH v7 8/8] systemd: add xen systemd service and module files Luis R. Rodriguez
2014-07-24 15:47 ` Ian Campbell
2014-07-25 23:34 ` Luis R. Rodriguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438773095.9747.64.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Wei.Liu2@citrix.com \
--cc=mcgrof@do-not-panic.com \
--cc=mcgrof@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.