From: Doug Goldstein Subject: Re: making xenstore domain easy configurable Date: Mon, 27 Jun 2016 15:59:46 -0500 Message-ID: References: <57711F8D.3030103@suse.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0345624880026107262==" Return-path: Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHddL-0006EJ-0s for xen-devel@lists.xenproject.org; Mon, 27 Jun 2016 20:59:55 +0000 Received: by mail-qk0-f195.google.com with SMTP id r136so13807025qke.3 for ; Mon, 27 Jun 2016 13:59:53 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Andrew Cooper , Juergen Gross , xen-devel , Wei Liu , Ian Jackson List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============0345624880026107262== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jibDsSH3Hk1OC55ptB04brHhQwJVQ9cXe" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jibDsSH3Hk1OC55ptB04brHhQwJVQ9cXe Content-Type: multipart/mixed; boundary="1MUwBpncejLX01LCOvwBf91UVDSR56biQ" From: Doug Goldstein To: Andrew Cooper , Juergen Gross , xen-devel , Wei Liu , Ian Jackson Message-ID: Subject: Re: [Xen-devel] making xenstore domain easy configurable References: <57711F8D.3030103@suse.com> In-Reply-To: --1MUwBpncejLX01LCOvwBf91UVDSR56biQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 6/27/16 7:59 AM, Andrew Cooper wrote: > On 27/06/16 13:43, Juergen Gross wrote: >> I'm just writing some patches to make it easy to switch between >> xenstore daemon and xenstore domain. My plan is to achieve this >> by a global configuration file containing configuration options >> for the host (e.g. /etc/xen/xen.conf). >> >> With the current systemd support this is not easy. There are >> systemd socket definitions to let systemd create the sockets for >> xenstored. As the sockets are not to be created in case xenstore >> is running in a xenstore domain things are becoming complicated. >> >> Today we have the following xenstore related systemd items: >> >> - xenstored_ro.socket and xenstored.socket >> - xenstored.service depending on the sockets >> - other services depending on xenstored.service >> >> A xenstore domain would need: >> >> - xenstore-domain.service >> - other services depending on xenstore-domain.service >> >> Being able to switch between both schemes just via a config file >> seems to be not easy, at least I don't know of any way to do the >> socket creation only in case they are required without breaking >> the dependency chain. >> >> So I'd suggest to remove xenstored_ro.socket and xenstored.socket >> and let xenstored create the sockets (as it is doing without >> systemd). I'm not aware of any disadvantage, as xenstored isn't >> restartable and thus can't take advantage of the permanent sockets >> offered by systemd. >> >> This would mean I could rip out the systemd specific stuff from >> xenstored and oxenstored. I could create a single xenstore.service >> script evaluating the config file and starting the correct xenstore >> (xenstored or xenstore domain). The other services would then depend >> on xenstore.service. This would remove the need to specify the >> type of xenstore daemon/domain (ocaml based or C based) in the systemd= >> file, too. >> >> Is there a better way to achieve what I want? Any other opinions? >=20 > This isn't the only advantage offered by socket activation. >=20 > As currently configured, every service which depends on xenstored.socke= t > can be started in parallel (as systemd creates the sockets ahead of > time), with the dependent services blocking a little on the socket whil= e > xenstored starts up sufficiently to service the requests. >=20 > In the case that xenstored is running in the local domain, socket > activation is a useful function to have. >=20 > OTOH, having anything explicitly depend on xenstored.socket is broken i= n > a model where xenstored might be running in a separate domain. I don't= > suppose systemd has any way of specifying "conditionally might have a > socket"? >=20 > ~Andrew How about we take this the other way? Let's go away from using the socket and always go through kernel interface. I understand that its faster to use sockets than using the interface but does this performance difference really affect an actual running system. If we manage to steer people towards a stubdom xenstore they won't have the option of using the sockets anyway. Just thinking that supporting two different interfaces always seems clumsy. --=20 Doug Goldstein --1MUwBpncejLX01LCOvwBf91UVDSR56biQ-- --jibDsSH3Hk1OC55ptB04brHhQwJVQ9cXe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0 iQJ8BAEBCgBmBQJXcZPFXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNTM5MEQ2RTNFMTkyNzlCNzVDMzIwOTVB MkJDMDNEQzg3RUQxQkQ0AAoJEKK8A9yH7RvUF0EP+QEgyCqI/Zqaoo2SeITgfPPd AZ+WyQxd02z6iJvcLaRZSNiyJqm1PFNz3spSV9ws7YHoXT4m2hHm3YvQlLHYSEHH gRmX2WSl/Vb0tVj2aFeFHVNuQAA3JaHkh9v8fISz73pqIHV3ZdeHSJj7DUfb+pwT ge70pb4k9D9mlyg8BhcHfMc1/nc7EJrdT+TL8UAKA8gizB5+QraN01horWt5pzOk f8LdlGYLbZRuIbpb/0bDR7Rej6e1IIaK03E+1k0LI8+B4m1kGG/U9a0PoxTfOfGW q5MIb1jF5qHL0eN788m6I04I1jGtD0Q7s9GSUDeT4FQaFoRoYN95Bog++SqsXavw trTG8YmFzjqIhmjvEXYFOUqtBoVkPNtDPM3N0Br/th944VMtWISL0EyIaVSU6Kl1 4EV0JlvnKJMqAwZke+jb3FUWS/Gi/BmLCnQSUf+0DhCilfRzyuhRfA+QZuZq1S1h JO7vFO1mGcrnmJQN8YUfTp9PLF3ujLglXhbkorMnvakq/il35Zm5ORpdUZdM23q7 ns/E1RQEjepkEmxX25TIOW9QGf0ep9d0PQ7PrwSEQv/h9tTMFsoBkTFyj2qKj3TA q21c5XN/jlwmg60LoOHN0sGnfmjhRnN/HDoRQBKVuR0Mb4EQS25Lr6jjq16bg76s tP3t3vB2QA+2ezc9hGZv =amgb -----END PGP SIGNATURE----- --jibDsSH3Hk1OC55ptB04brHhQwJVQ9cXe-- --===============0345624880026107262== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============0345624880026107262==--