All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Duffy <cduffy@spamcop.net>
To: xen-devel@lists.xensource.com
Subject: xenstore watches not firing for external-to-xend code using xen.xend.xenstore classes
Date: Thu, 09 Feb 2006 10:35:50 -0600	[thread overview]
Message-ID: <dsfr19$ccv$1@sea.gmane.org> (raw)

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 ])

             reply	other threads:[~2006-02-09 16:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-09 16:35 Charles Duffy [this message]
2006-02-09 16:55 ` xenstore watches not firing for external-to-xend code using xen.xend.xenstore classes Ewan Mellor
2006-02-09 17: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='dsfr19$ccv$1@sea.gmane.org' \
    --to=cduffy@spamcop.net \
    --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.