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] Re: xm list dropping domain?

Tim Freeman wrote:
Thanks for the information Mike,

I supposed it was getting destroyed, hmm.  I'm making the controller
part of a grid service and the VM's are distinguished by an assigned
distinguished name which maps to a local name (so that ID #s can
change).  The controller is only dealing in local names now.  It looks
like one of the domain events is restart:


The domain exits with code reboot:
(event xend.domain.exit (gridvm1 3 reboot))

This is the restart being scheduled:
(event xend.domain.restart (gridvm1 3 schedule))

Now the domain gets destroyed and goes away:
(event xend.domain.destroy (gridvm1 3))
(event xend.domain.died (gridvm1 3))

Now the domain has gone we can restart it:
(event xend.domain.restart (gridvm1 3 begin))

Between the died event and the create event gridvm1 will
not appear in 'xm list'.
(event xend.domain.create (gridvm1 3))

The create succeeded so we get a restart success:
(event xend.domain.restart (gridvm1 3 success))

The domain starts to run:
(event xend.domain.unpause (gridvm1 3))

..where "gridvm1" is the local name.  So I don't think a domain object
is necessary, couldn't I poll 8001 for any changes concerning the local
name (as long as nothing at a higher level started a domain with the
same name in that window)?.  That's pretty cool, I didn't know you could
receive the events, I thought you could only 'ask.'

That makes me think I should write a polling thread that any class could
register callbacks with?  My thinking is that the 'right way' is to
decouple any higher level functionality.  Unless I'm missing a
programming trick here..

What I do in java is use a thread to read the events out of of the socket
and post them to a class handling the usual 'listener' pattern
so that things can register callbacks. Pretty much as you suggest.
In python you could use asyncore or twisted to avoid threads/blocking.

Hope this helps,

Mike


On Tue, 5 Oct 2004 14:25:58 +0100 Tom Wilkie <tw275@xxxxxxxxx> wrote:


From python you can use XendClient to call the api directly - either
synchronously or asynchronously. From Java you can use Jakarta commons
httpclient, and from C you can use libcurl (see the xfrd source in xen).


I wrote a simple interface to xend in java for the high-xeno stuff. Let me know if you need it, I don't think that repository is public.


Thanks, I would definitely like to take a look.  I started an http
interface, but I do need to think about all of this some more (if I
combined or made improvements I'd make that available to anyone also).

Thanks to you both for you help!

Tim




Cheers

Tom



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel







-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel