This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


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

To: Anthony Wright <anthony@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Domains not being destroyed properly
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
Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=gt.net; h=message-id:date :from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=mail; bh=nVFvnhstEjI6 odBhvziENiee9RU=; b=K0E44kApgcI+g994betlWbMo4vRkgV8/Z0YdYDFlxeA5 SLCnBUtFZVKIEqhOmp+Wm/3KQb6zRFdFe6b6aYQUHL4cTdionamSTt61G2FaprvS 1rwAxz1SmjtzqeRsFdL7qDKWwImHh5DwTLluzA3inSbydY+ptdtbsFx+DyNxOZk=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DFB3A90.70707@xxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4DFB3A90.70707@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10
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
set -x -e


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

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

exit 0

- Nathan

Xen-devel mailing list