WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Basic xenstore questions (building a watchdog)

To: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Basic xenstore questions (building a watchdog)
From: Charles Duffy <cduffy@xxxxxxxxxxx>
Date: Mon, 16 Jan 2006 12:35:47 -0600
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 16 Jan 2006 18:42:38 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20060113133412.GB1253@xxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <dq6io3$ll6$1@xxxxxxxxxxxxx> <20060113133412.GB1253@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051025 Thunderbird/1.5 Mnenhy/0.7.3.0
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)


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