All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>,
	"Jan Rękorajski" <baggins@pld-linux.org>,
	"Ian Jackson" <ian.jackson@eu.citrix.com>,
	"Jacek Konieczny" <jajcus@jajcus.net>,
	"M A Young" <m.a.young@durham.ac.uk>,
	xen-devel@lists.xenproject.org,
	"Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Subject: Re: [PATCH v2 7/7] systemd: add support initial xen systemd	service files
Date: Mon, 24 Mar 2014 17:36:57 +0100	[thread overview]
Message-ID: <20140324163657.GA3463@wotan.suse.de> (raw)
In-Reply-To: <1395655873.19365.17.camel@kazak.uk.xensource.com>


[-- Attachment #1.1: Type: text/plain, Size: 2636 bytes --]

On Mon, Mar 24, 2014 at 10:11:13AM +0000, Ian Campbell wrote:
> On Sat, 2014-03-22 at 03:26 +0100, Luis R. Rodriguez wrote:
> > On Fri, Mar 21, 2014 at 10:08:14AM +0000, Ian Campbell wrote:
> > > On Wed, 2014-03-19 at 13:58 -0700, Luis R. Rodriguez wrote:
> > > > [...]
> > > > diff --git a/tools/hotplug/Linux/systemd/oxenstored.service.in b/tools/hotplug/Linux/systemd/oxenstored.service.in
> > > > [...]
> > > > +ExecStartPost=-@BINDIR@/xenstore-write "/local/domain/0/name" "Domain-0"
> > > > diff --git a/tools/hotplug/Linux/systemd/xenstored.service.in b/tools/hotplug/Linux/systemd/xenstored.service.in
> > > [...]
> > > > +ExecStartPost=@BINDIR@/xenstore-write "/local/domain/0/name" "Domain-0"
> > > 
> > > I accidentally deleted the subthread about writing domid here too, but I
> > > was wondering if it might be better to have a common xenstore service
> > > which depends on oxenstore.service || cxenstore.service and then does
> > > this kind of common implementation agnostic setup in one place where it
> > > can't get out of sync easily?
> > 
> > That's what I was hoping for to achieve with the socket file but that
> > seems to not work as expected, even if you claim the socket explicitly
> > as part of both oxenstored and xenstored. To me this could likely be
> > an enhancement to systemd but not sure.
> > 
> > systemd does not allow one to use || as part of the language for requirements,
> 
> Does it not have some sort of "Provides: some-virtual-facility" which
> two things can provide and other things can depend on?

Not that I have seen.

> > This means we either do some sort of meta @VARIABLE@ substitution or a common
> > init routine which will do the or checking for us. The only problem with this
> > is systemd will treat the Forking type service ExecStart as the process to care
> > for, and if we add a wrapper that'd be dead. I haven't tried to implement one
> > but I think this could confuse systemd or administrators.
> 
> Yes, lets not go that route.

I studied this approach a bit more and it turns out that execve() does just what
we want, it will carry the same PID for the spawned process, it won't return, it'll
just go onto the other process, if it fails it returns back, in which case we can
try the other cxenstored. We'd just have to rename the C xentstored to censtored.
This would simplify things for both init systems and systemd. In the init system
the check for oxenstored can be removed, in systemd we'd just have one systemd 
service file.

In light of this I'd like for us to consider this approach now.

Thoughts?

  Luis

[-- Attachment #1.2: Type: application/pgp-signature, Size: 835 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-03-24 16:37 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 20:58 [PATCH v2 0/7] xen: add systemd files Luis R. Rodriguez
2014-03-19 20:58 ` [PATCH v2 1/7] xenstore-read: add support for a retry open limit on xenstored Luis R. Rodriguez
2014-03-21 15:21   ` Ian Campbell
2014-03-21 15:22     ` Ian Jackson
2014-03-22  1:36       ` Luis R. Rodriguez
2014-03-22  1:33     ` Luis R. Rodriguez
2014-03-24  9:57       ` Ian Campbell
2014-03-21 15:40   ` David Vrabel
2014-03-21 16:01     ` Ian Campbell
2014-03-22  1:43       ` Luis R. Rodriguez
2014-03-24 10:01         ` Ian Campbell
2014-03-22  1:41     ` Luis R. Rodriguez
2014-03-19 20:58 ` [PATCH v2 2/7] xencommons: use the retry limit instead of implementing our own timeout Luis R. Rodriguez
2014-03-21 15:24   ` Ian Campbell
2014-03-19 20:58 ` [PATCH v2 3/7] tools/xendomains: make xl the default Luis R. Rodriguez
2014-03-21 15:26   ` Ian Campbell
2014-03-19 20:58 ` [PATCH v2 4/7] tools/xendomains: remove old redhat check Luis R. Rodriguez
2014-03-21 15:28   ` Ian Campbell
2014-03-22  1:56     ` Luis R. Rodriguez
2014-03-19 20:58 ` [PATCH v2 5/7] tools/xendomains: do space cleanups Luis R. Rodriguez
2014-03-21 15:29   ` Ian Campbell
2014-03-19 20:58 ` [PATCH v2 6/7] tools/xendomains: move to sbin and use init helper Luis R. Rodriguez
2014-03-19 22:03   ` Olaf Hering
2014-03-22  2:00     ` Luis R. Rodriguez
2014-03-21 15:34   ` Ian Campbell
2014-03-22  2:17     ` Luis R. Rodriguez
2014-03-24 10:09       ` Ian Campbell
2014-04-28  5:11         ` Luis R. Rodriguez
2014-04-28  9:15           ` Ian Campbell
2014-04-28 10:47             ` Luis R. Rodriguez
2014-03-19 20:58 ` [PATCH v2 7/7] systemd: add support initial xen systemd service files Luis R. Rodriguez
2014-03-19 21:05   ` Luis R. Rodriguez
2014-03-21 10:08   ` Ian Campbell
2014-03-22  2:26     ` Luis R. Rodriguez
2014-03-24 10:11       ` Ian Campbell
2014-03-24 16:36         ` Luis R. Rodriguez [this message]
2014-04-28  5:12         ` 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=20140324163657.GA3463@wotan.suse.de \
    --to=mcgrof@suse.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=baggins@pld-linux.org \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jajcus@jajcus.net \
    --cc=m.a.young@durham.ac.uk \
    --cc=mcgrof@do-not-panic.com \
    --cc=stefano.stabellini@eu.citrix.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.