[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Domains not being destroyed properly


  • To: Anthony Wright <anthony@xxxxxxxxxxxxxxx>
  • From: Nathan March <nathan@xxxxxx>
  • Date: Fri, 17 Jun 2011 11:12:41 -0700
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 17 Jun 2011 11:13:30 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gt.net; h=message-id:date :from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=mail; b=FmHZXP C6SqyH7QwUOuyDqedZt7eHR7cTXk5ySPTQPSIucW3hqSB+j+aSpw6FmMc+KJU3+T SXrFeBHUDrMQdPxR2SXAAZ38sCaHZPaTEbAko74kbYz7rjcqtg01vqT69VIeXnm6 Ki5ZYFm1ICYxsO/lzWbSjW/7rKIMx7SpZri94=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

On 6/17/2011 4:29 AM, Anthony Wright wrote:
> As an extra question... Is there a way to be notified when a domain is
> destroyed other than leaving the 'xl create' process lying around? I'd
> like to know when any domain is destroyed, and leaving a large number of
> processes lying around just to be able to do this seems rather ugly. In
> the past I've editted some of the python code to achieve this, but my
> patch doesn't work with 4.1, so I'm seeing if there's an official way to
> do this before I work out a new patch.

Not ideal, but my approach was to add hook scripts into the block device
script and consider a vm down if xvda1 has been removed:

Line 229 (below the FRONTEND_UUID):
   /path/to/block add ${XENBUS_PATH}

Line 324 (below "remove)"):
   /path/to/block remove ${XENBUS_PATH}


xen1 scripts # cat block
#!/bin/bash
set -x -e

STATE="$1"
PATH="$2"

VMNAME=$(/usr/bin/xenstore-read ${PATH}/domain);
DEV=$(/usr/bin/xenstore-read ${PATH}/dev);

if [[ "$DEV" == "xvda1" ]]; then
    # Do stuff
fi;

exit 0


- Nathan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.