All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: "Luis R. Rodriguez" <mcgrof@suse.com>
Cc: Keir Fraser <keir@xen.org>,
	"Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Jan Beulich <jbeulich@suse.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v5 12/14] autoconf: xen: enable explicit preference option for xenstored preference
Date: Wed, 28 May 2014 10:30:49 +0100	[thread overview]
Message-ID: <1401269449.24800.7.camel@kazak.uk.xensource.com> (raw)
In-Reply-To: <20140523232031.GA26450@wotan.suse.de>

On Sat, 2014-05-24 at 01:20 +0200, Luis R. Rodriguez wrote:
> On Thu, May 22, 2014 at 11:05:47AM +0100, Ian Campbell wrote:
> > On Thu, 2014-05-22 at 01:02 +0200, Luis R. Rodriguez wrote:
> > > > It might be reasonable for hotplugpath.sh to define
> > > > XENSTORE_xenstored=/path/to/xenstored
> > > > XENSTORE_oxenstored=/path/to/oxenstored
> > > > 
> > > > and use the existing XENSTORED variable in sysconfig to select which.
> > > 
> > > Ah but but hotplugpath.sh is one of those automatically generated files
> > > and after my last patch in this series they are all now shared in one
> > > master file, config/xen-environment-scripts.in, and since the we want
> > > to keep script file Shell / Python agnostic checking which one is set
> > > on sysconfig is not something reasonable to do on that master file.
> > 
> > Well, it must be possible to change which xenstored implementation is
> > used by editing a single setting in /etc/{sysconfig,default}/xencommons,
> > maybe that means more code somewhere, I don't know. idieally you would
> > be able to say
> > XENSTORE=xenstored # C xenstore at default path
> > XENSTORE=oxenstored # Ocaml xenstore at default path
> > XENSTORE=/path/to/something # xenstored at some custom path.
> 
> Agreed.
> 
> > > My series of patches already deals with the old init and xencommons script to
> > > start xenstore, it used the hotplugpath.sh for deducing the xenstore
> > > daemon it should use by default and switching this to rely on the sysconfig
> > > xencommons should be easy if it wasn't already dealt with there already.
> > > 
> > > For systemd though we can't use varibles on ExecStart for the process, we
> > > however can use environment variables. We have a few options. Fedora's
> > > approach was to use two service unit files which conflicted with each other,
> > > although I'm sure we can work it out by using a target unit and let folks
> > > flip it seems rather silly to me to maintain two service unit files with
> > > identical entries. Therefore in my new approach usres would have to manually
> > > edit the service file with the differnt path / binary. Another possibility
> > > is to have a central launcher binary that just does getenv() and execve()
> > > on the desired binary. If this is agreeable I can work on it and it could
> > > even be shared by the old init as well.
> > 
> > Which is considered the most "systemd" approach?
> 
> Systemd tries to even recommend to shy away from sysconfig/default directory for
> stashing entries, one can set environment variables within the service unit itself,
> but if we are to maintain compatiblity with old stuff relying on sysconfig seems
> the reasonable and accepted way, then we'd include that file as part of the
> running environment, just as our systemd service unit files do now in this series.

I'm mostly concerned that people *not* using systemd can continue to
use /etc/{default,sysconfig}/xencommons in the way which they are used
to.

For people who are using systemd the question is whether it is more or
less confusing to have an unused /etc/{default,sysconfig}/xencommons
sitting there vs. doing things in the less "systemd" way. The compromise
is perhaps to seed the defaults from /e/{d,s}/xencommons but allow them
to be changed in either that file or in the unit file? Is that possible?

> 
> More details here:
> 
> http://0pointer.de/blog/projects/on-etc-sysinit.html
> 
> As for dynamic use daemons, there aren't good examples but the undocumented way
> of doing this but as a per a conversation at the LF Linux Collaboration summit
> one way to deal with this is to use one service target files for defining what
> we do, we'd have two separate service unit files for each cxenstored and
> oxenstored, the services that need to depend on it would depend on the target,
> not the actual service unit files, the user then would have to enable one or
> the other. A sysconfig edit however would not trigger a change, which is what
> we seem to want,

What do you mean? I don't expect editing sysconfig will automagically do
anything, some further action would be required, and since xenstored is
involved that further action most likely involves a reboot.

Can a systemd unit "soft fail"? i.e. fail but not make a huge red
highlighted fuss about it? Then each of the two units could check if
they were configured and softfail if not (expecting that the other one
is configured). Alternatively perhaps there is some sort of pre-check
hook which could be used to see if the unit can/should be run?

Ian.

  reply	other threads:[~2014-05-28  9:30 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20 12:31 [PATCH v5 00/14] xen: add systemd support Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 01/14] xenstored: enable usage of config.h on both xenstored and oxenstored Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 02/14] libxenstore.so: add support for systemd Luis R. Rodriguez
2014-05-21 14:35   ` Ian Campbell
2014-05-21 14:56     ` Ian Campbell
2014-05-21 16:32       ` Luis R. Rodriguez
2014-05-21 16:48         ` Ian Campbell
2014-05-21 17:15           ` Luis R. Rodriguez
2014-05-22  9:36             ` Ian Campbell
2014-05-22  9:59               ` Luis R. Rodriguez
2014-05-21 16:24     ` Luis R. Rodriguez
2014-05-21 16:39       ` Ian Campbell
2014-05-21 17:29         ` Luis R. Rodriguez
2014-05-22  9:39           ` Ian Campbell
2014-05-22 10:01             ` Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 03/14] cxenstored: add support for systemd active sockets Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 04/14] oxenstored: " Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 05/14] oxenstored: force FD_CLOEXEC with Unix.set_close_on_exec on LSB init Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 06/14] tools/xendomains: make xl the default Luis R. Rodriguez
2014-05-21 15:05   ` Ian Campbell
2014-05-21 17:29     ` Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 07/14] tools/xendomains: do space cleanups Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 08/14] tools/xendomains: move to libexec and use a smaller init helper Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 09/14] autoconf: xen: force a refresh with autoconf Luis R. Rodriguez
2014-05-21 15:07   ` Ian Campbell
2014-05-21 17:35     ` Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 10/14] autoconf: update m4/pkg.m4 Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 11/14] autoconf: xen: move standard variables to a generic place Luis R. Rodriguez
2014-05-20 13:37   ` Jan Beulich
     [not found]   ` <537B76D1020000780001422C@suse.com>
2014-05-20 17:54     ` Luis R. Rodriguez
2014-05-21  7:32       ` Jan Beulich
2014-05-21  8:03         ` Luis R. Rodriguez
2014-05-21  8:11           ` Jan Beulich
2014-05-21  8:27             ` Luis R. Rodriguez
2014-05-21 10:33             ` Ian Campbell
2014-05-21 13:54               ` Jan Beulich
2014-05-21 15:14               ` Ian Campbell
2014-05-21 15:20                 ` Jan Beulich
2014-05-21 15:26   ` Ian Campbell
2014-05-21 21:54     ` Luis R. Rodriguez
2014-05-22  9:46       ` Ian Campbell
2014-05-20 12:31 ` [PATCH v5 12/14] autoconf: xen: enable explicit preference option for xenstored preference Luis R. Rodriguez
2014-05-21 15:44   ` Ian Campbell
2014-05-21 23:02     ` Luis R. Rodriguez
2014-05-22 10:05       ` Ian Campbell
2014-05-23 23:20         ` Luis R. Rodriguez
2014-05-28  9:30           ` Ian Campbell [this message]
2014-05-29 16:09             ` Don Koch
2014-05-29 23:29             ` Luis R. Rodriguez
2014-06-01  6:15               ` [systemd-devel] " Lennart Poettering
2014-06-01  6:15               ` Lennart Poettering
2014-06-05  0:31                 ` Luis R. Rodriguez
2014-06-05  2:52                   ` Cameron Norman
2014-06-10  1:15                     ` Luis R. Rodriguez
2014-06-10  1:15                     ` Luis R. Rodriguez
2014-06-05  2:52                   ` Cameron Norman
2014-06-05 11:22                   ` Lennart Poettering
2014-06-05 11:22                   ` Lennart Poettering
2014-06-05 18:01                     ` Luis R. Rodriguez
2014-06-05 19:24                       ` Lennart Poettering
2014-06-05 19:24                       ` Lennart Poettering
2014-06-05 19:26                         ` Andrew Lutomirski
2014-06-05 19:26                         ` Andrew Lutomirski
2014-06-05 18:01                     ` Luis R. Rodriguez
2014-06-05  0:31                 ` Luis R. Rodriguez
2014-05-29 23:29             ` Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 13/14] xencommons: move module list into a generic place Luis R. Rodriguez
2014-05-20 13:40   ` Jan Beulich
     [not found]   ` <537B776D020000780001425E@suse.com>
2014-05-20 18:03     ` Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 14/14] systemd: add xen systemd service and module files Luis R. Rodriguez
2014-05-20 12:48   ` 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=1401269449.24800.7.camel@kazak.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=mcgrof@do-not-panic.com \
    --cc=mcgrof@suse.com \
    --cc=tim@xen.org \
    --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.