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

[Xen-devel] xenstore watches not firing for external-to-xend code using

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] xenstore watches not firing for external-to-xend code using xen.xend.xenstore classes
From: Charles Duffy <cduffy@xxxxxxxxxxx>
Date: Thu, 09 Feb 2006 10:35:50 -0600
Delivery-date: Thu, 09 Feb 2006 16:50:43 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
I'm trying to write a simple xenstore-based watchdog, as discussed previously on this list (quite some time ago -- it got pushed to the back of my priority list for a bit).

In any event, I'm trying to use the below code to test the ability of a program external to xend to place watches on xenstore. However, the callbacks aren't firing except on initial startup, either when I use xenstore-write to update /tool/watchdog/test or when I start or shutdown domains (to invoke the @introduceDomain or @releaseDomain triggers). Obviously I'm missing something here. If this is a simple error on my part, or if I'm expecting behaviour that wasn't designed for, I'd appreciate a pointer or two.

Thanks!

---------

#!/usr/bin/env python

from xen.xend.xenstore.xstransact import xstransact
from xen.xend.xenstore.xswatch import xswatch

from pprint import pprint
import time, logging
logging.basicConfig(level=logging.DEBUG)

TROOT = '/tool/watchdog'

class XenWatchdog:
  def __init__(self):
    xswatch('@releaseDomain', self.callback, 'releaseDomain')
    xswatch('@introduceDomain', self.callback, 'introduceDomain')
    xswatch('%(TROOT)s/test' % locals(), self.callback, 'test')
  def callback(self, *args, **kwargs):
    pprint([ 'onReleaseDomain', args, kwargs ])


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

<Prev in Thread] Current Thread [Next in Thread>