All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Duffy <cduffy@spamcop.net>
To: Ewan Mellor <ewan@xensource.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Basic xenstore questions (building a watchdog)
Date: Mon, 16 Jan 2006 12:35:47 -0600	[thread overview]
Message-ID: <43CBE783.7070206@spamcop.net> (raw)
In-Reply-To: <20060113133412.GB1253@leeni.uk.xensource.com>

Ewan Mellor wrote:
> When domains are created or destroyed there are special watches that fire
> (@introduceDomain and @releaseDomain).  This might help you get the
> non-persistence that you require (by removing the path again when the domain
> is destroyed).
>   
Do those work outside of xend? I'm trying the following, and it's having
no effect when my domains restart after the watches' initial fire:

#!/usr/bin/env python

from xen.xend.xenstore.xswatch import xswatch
from pprint import pprint
import time, logging
logging.basicConfig(level=logging.DEBUG)

class XenWatchdog:
        def __init__(self):
                xswatch('@releaseDomain', self.onReleaseDomain)
                xswatch('@introduceDomain', self.onIntroduceDomain)
        def onReleaseDomain(self, *args, **kwargs):
                pprint([ 'onReleaseDomain', args, kwargs ])
        def onIntroduceDomain(self, *args, **kwargs):
                pprint([ 'onIntroduceDomain', args, kwargs ])

XenWatchdog()
while True:
        time.sleep(1)

  reply	other threads:[~2006-01-16 18:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-12 21:46 Basic xenstore questions (building a watchdog) Charles Duffy
2006-01-13 13:34 ` Ewan Mellor
2006-01-16 18:35   ` Charles Duffy [this message]
2006-01-13 14:51 ` Mark Williamson
2006-01-13 15:16   ` Charles Duffy

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=43CBE783.7070206@spamcop.net \
    --to=cduffy@spamcop.net \
    --cc=ewan@xensource.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.