From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Duffy Subject: Re: Basic xenstore questions (building a watchdog) Date: Mon, 16 Jan 2006 12:35:47 -0600 Message-ID: <43CBE783.7070206@spamcop.net> References: <20060113133412.GB1253@leeni.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060113133412.GB1253@leeni.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ewan Mellor Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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)