|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] Basic xenstore questions (building a watchdog)
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
|
|
|
|
|