All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan March <nathan@gt.net>
To: Anthony Wright <anthony@overnetdata.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Domains not being destroyed properly
Date: Fri, 17 Jun 2011 11:12:41 -0700	[thread overview]
Message-ID: <4DFB9919.8030502@gt.net> (raw)
In-Reply-To: <4DFB3A90.70707@overnetdata.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

  reply	other threads:[~2011-06-17 18:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 11:29 Domains not being destroyed properly Anthony Wright
2011-06-17 18:12 ` Nathan March [this message]
2011-06-21 11:51 ` Ian Campbell
2011-06-21 12:57   ` Anthony Wright
2011-06-21 13:13     ` Ian Jackson
2011-06-21 13:39     ` Konrad Rzeszutek Wilk
2011-06-21 14:52       ` Anthony Wright
2011-06-21 15:44         ` Ian Campbell
2011-06-21 16:04           ` Anthony Wright
2011-06-22  7:56             ` Ian Campbell
2011-06-24 12:54               ` Anthony Wright
2011-06-24 13:01                 ` Tim Deegan
2011-06-24 13:36                   ` Anthony Wright
2011-06-24 14:21                     ` Ian Campbell
2011-06-24 13:45                 ` Ian Campbell
2011-06-24 14:15                   ` Anthony Wright
2011-06-24 14:24                     ` Ian Campbell
2011-06-21 16:26           ` Ian Jackson
2011-06-21 16:42             ` Ian Campbell
2011-06-21 17:01               ` Keir Fraser
2011-06-21 19:35             ` Tim Deegan
2011-06-22  8:02               ` Ian Campbell
2011-06-21 13:27 ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DFB9919.8030502@gt.net \
    --to=nathan@gt.net \
    --cc=anthony@overnetdata.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.