From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Luis R. Rodriguez" Subject: Re: [PATCH v2 7/7] systemd: add support initial xen systemd service files Date: Mon, 24 Mar 2014 17:36:57 +0100 Message-ID: <20140324163657.GA3463@wotan.suse.de> References: <1395262733-11885-1-git-send-email-mcgrof@do-not-panic.com> <1395262733-11885-8-git-send-email-mcgrof@do-not-panic.com> <1395396494.27358.18.camel@kazak.uk.xensource.com> <20140322022621.GI5011@wotan.suse.de> <1395655873.19365.17.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4007055094338139442==" Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WS7rw-0007kK-QH for xen-devel@lists.xenproject.org; Mon, 24 Mar 2014 16:37:01 +0000 In-Reply-To: <1395655873.19365.17.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Stefano Stabellini , Jan =?utf-8?Q?R=C4=99korajski?= , Ian Jackson , Jacek Konieczny , M A Young , xen-devel@lists.xenproject.org, "Luis R. Rodriguez" List-Id: xen-devel@lists.xenproject.org --===============4007055094338139442== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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/to= ols/hotplug/Linux/systemd/oxenstored.service.in > > > > [...] > > > > +ExecStartPost=3D-@BINDIR@/xenstore-write "/local/domain/0/name" "D= omain-0" > > > > diff --git a/tools/hotplug/Linux/systemd/xenstored.service.in b/too= ls/hotplug/Linux/systemd/xenstored.service.in > > > [...] > > > > +ExecStartPost=3D@BINDIR@/xenstore-write "/local/domain/0/name" "Do= main-0" > > >=20 > > > I accidentally deleted the subthread about writing domid here too, bu= t 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? > >=20 > > 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. > >=20 > > systemd does not allow one to use || as part of the language for requir= ements, >=20 > 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 wit= h 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 impleme= nt one > > but I think this could confuse systemd or administrators. >=20 > 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 retur= n, 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 cens= tored. This would simplify things for both init systems and systemd. In the init s= ystem the check for oxenstored can be removed, in systemd we'd just have one syst= emd=20 service file. In light of this I'd like for us to consider this approach now. Thoughts? Luis --wac7ysb48OaltWcw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iQIcBAEBAgAGBQJTMF8pAAoJEPep4JnvMe6zePsP+wfaAh5Xq4aLuf+7tqaWlBWW rJ+he4ghTU0rd6sLouMd2l/by8/L9cvrKlrFhGxoVmGhZBsmSMcTagU1onvMndB4 yB+40fIja1coOX5heCa7j02bjc3JMO8ag/QULYDfpX1Mzg5mfVQTp82mPuBK1uFf pMJZMT2/NwyktKy3drr6mvQnERTtp+S8xNlH1caKRWjSGTlU9l+IcwnUyRwSroJ+ zSu6/vTmmM79On+DDYCpICmIE5Tz9g/ydVLM0ocA2MxHgL+zJEeUy/BhwV3TDsVf jdkPUS7Is56vBNcZiclzkNijHV4J0HOL1Q/QtqC/A9mWXscTrZAm2iQNjOGNN5Mi hYQ8zgGvOx+WBm0jynEzqbLk/khehMfesEEX2zgslGkd4mUlzbz8wkmwOcN6jbdU w5M09l4+0xZHrur50Fe9aR3hqT043o6bza0csGtfrMSVfM/NCzGf09vK9gwYyj+Z iCwoWUjlrAQsfnuYXT+SVYokUcvAaoKY74I+K7lLUw3iQVuYzKEIkUFJae55qFIw +ORlCw9APbvU1QUm1UgYWNHoezy+dJ4JmJHe1mjQxmv2LEz2q87Ei64KvNzrnbgR m4r/zKnt3RFoDH1GkUe7jfLo3txT/6auDM80ZMFR79Rn8J5ct8tw+erPSQnrS3k8 b/qB2YvF3He6GGB3Oblc =/m3P -----END PGP SIGNATURE----- --wac7ysb48OaltWcw-- --===============4007055094338139442== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============4007055094338139442==--