From: Markus Hochholdinger Subject: Re: [RFC] Making Xen cluster aware - locking domains on shared storage Date: Mon, 5 May 2008 17:42:49 +0200 Message-ID: <200805051742.54861.Markus@hochholdinger.net> References: <20080427010203.GB17509@outback.rfc2324.org> <20080503145544.GB22088@outback.rfc2324.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0894331540==" Return-path: In-Reply-To: <20080503145544.GB22088@outback.rfc2324.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Maximilian Wilhelm List-Id: xen-devel@lists.xenproject.org --===============0894331540== Content-Type: multipart/signed; boundary="nextPart1286238.9daD3oWBtv"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1286238.9daD3oWBtv Content-Type: multipart/mixed; boundary="Boundary-01=_6ryHIkg/Gndmbce" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_6ryHIkg/Gndmbce Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, Am Samstag, 3. Mai 2008 16:55 schrieb Maximilian Wilhelm: > Nobody interested in this? i'm very interested in this. But my approach for now is, that i check on al= l=20 other xen hosts if the domU to be created is already running elsewhere. My assumption is, that no two domU configration use the same block devices. I've written a little wrapper for xm (xm-wrapper.sh.tgz) and include this w= ith alias xm=3D'/usr/local/sbin/xm-wrapper.sh' in the ~/.bashrc on my dom0s. It's ugly, because it uses ssh to connect to = the=20 other dom0s and has its own configuration (/etc/xen/hosts) but works for me. Perhaps something like this could natively implemented in xm? Hm, or=20 clusterfied xm (configuration of other dom0s in /etc/xen/xend-config.sxp)=20 which can check for a running domU cluster wide? Mainly, the check should use the xen api to get informations (and not xm). You also could walk though the domUs block device list and look which block= =20 devices are in use, and check against the block devices to be used for the= =20 starting domU? The same xm does for local running domUs. What do other people to prevent two domUs from using the same block devices= in=20 a xen cluster setup? > > These days I had the idea, that it should not be that hard to pimp > > 'xm' to check if a domain already is running somewhere in the cluster > > if there is a shared storage available. > > > > The basic idea is the following: > > > > Consider a cluster of n (>=3D 2) Xen nodes which share some storage > > (e.g. a SAN or NAS or whatever) where the storage for the DomUs is > > located and where some piece of shared (cluster) filesystem is locate= d, > > too. > > > > Let's asume further the shared file system is mountet to /xen_cluster > > on all nodes. > > > > Now it would come in handy if xm (or maybe some other part of the > > Xen univserse) could create some kind of lockfile on this FS to > > indicate that a given domain is already running somewhere in this clust= er > > (maybe the Dom0 could be written into this file). > > > > This way it would be quite easy to prevent trouble from people > > running Xen in this kind of environment, as on domain could only be > > started once on the cluster. > > > > > > So I've made up there patches > > * [0] Example options for /etc/xen/xend-config.sxp > > * [1] for options parsing for /etc/xen/xend-config.sxp > > * [2] Basic implementation of lockfile checking/creation during 'xm > > create' phase. The interesting part (shutdown, destroy, reboot(?), > > migrate, ...) is missig. > > > > So what do you think about all this? > > > > I guess there is no big resistance against the idea as such. > > What about the implementation approach? > > Is this somethings you could imagine as a direction to go to? > > Or maybe handle all of this internally to drop the dependancy of the > > shared file system? > > > > [0] http://files.rfc2324.org/patches/xen/xend-config.sxp.diff > > [1] http://files.rfc2324.org/patches/xen/XendOptions.py.diff > > [2] http://files.rfc2324.org/patches/xen/create.py.diff > > Ciao > Max =2D-=20 greetings eMHa --Boundary-01=_6ryHIkg/Gndmbce Content-Type: application/x-tgz; name="xm-wrapper.sh.tgz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="xm-wrapper.sh.tgz" H4sIAG43q0YAA+2U30/bMBDH+5r8FYdb0RYJ0ma0k5CKNm2w8VB4GJOQpk1KE6exltiV7ZRu2h+/ c36UMgZPiGnSfV7SxHdff+98bml0kKs4ygOzEDLYFIe3OlqtuD4yWeeZGCGvJ5PqidTPadi+h+Ho uDMeTSfh9FV4PMHv40k4mnZg9FwGnqI0NtIAHa2UfSoOw9L0JQy9LN29wJ37IjKZ73f9LlxIiKAo cytgwyVkyljgci20kgWXFmwmDDQzAnHG4+8GFjxVmkOseWSFXKKA5Leo5QQSVURCgkhBWMBUU2qe /wCpLOhSSheucEt8z1Cw3fKo8nKd8e0Xg6bQygK3UTIVS5RJAIUDbuMAg4I6aKAkr+JlVHBQGsQK haIk0dwYcJ5zIfkQN0y2gmg7zqJFjvFrDDAmc9s7/wWstFrqqPBv5jMWlHhZmmvC3DoWlQqNIrEq CqeI9VVN4JX+H9b4RrhHokCVbet8lPgCrDdmMANW5zL4Cvv7+PnQALuvgUs+9kn6XheW3DatQBM5 971KyuX0Qhfn1YHeu6vL84sPM/fV93i+jdoq/z18d9nlGdzB43GmgJ1prfQJfJZVzyzWs8JD2vFy AlWShxVbGPteKlrDOxNRH1BpQaW7uU5vHWlRab+/ml++nZ/5XikNZrPm3RlaRzlWOlhqvoL+NyfW x/faPYNfYHA8TFCvwMEMDvpBv0mf9YPlkLUN+4lpre5OHx4p1RXxmPN29weVV2cNbsq244xLOJw3 Z5cfrz5duznuDeLIPjjvoe8lCvXQ6p4bTOi1KWwPf89dM0UC/baCPoNTCBK+DmSZ5xCe7qOJtqT7 NbUpMGh8D7FnvDCuSncp7i5nuyerNJrKqtISvG2uQL7hcWnxp7PEem+YXw/MdgVuhc1cy5qxvwtE mX/9H0gQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBPE/8xv0oumqACgAAA== --Boundary-01=_6ryHIkg/Gndmbce-- --nextPart1286238.9daD3oWBtv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBIHyr+XT3LE+AjWCsRAs+JAKCl7k7sh/P5IeY4J6Ot/Xv9tCiYcgCg8q8l tD3XXQeB++i7eo7yZFch/jw= =3okl -----END PGP SIGNATURE----- --nextPart1286238.9daD3oWBtv-- --===============0894331540== 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.xensource.com http://lists.xensource.com/xen-devel --===============0894331540==--