All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Wray <mike.wray@hpl.hp.com>
To: Tim Freeman <tfreeman@mcs.anl.gov>
Cc: Tom Wilkie <tw275@cam.ac.uk>, xen-devel@lists.sourceforge.net
Subject: Re: Re: xm list dropping domain?
Date: Wed, 06 Oct 2004 15:20:18 +0100	[thread overview]
Message-ID: <4163FF22.4040807@hpl.hp.com> (raw)
In-Reply-To: <20041005100800.58420e3e@prana-bindu>

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@cam.ac.uk> 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@lists.sourceforge.net
>>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

  reply	other threads:[~2004-10-06 14:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-01 19:00 xm list dropping domain? Tim Freeman
2004-10-01 19:12 ` Tim Freeman
2004-10-05 13:09   ` Mike Wray
2004-10-05 13:25     ` Tom Wilkie
2004-10-05 15:08       ` Tim Freeman
2004-10-06 14:20         ` Mike Wray [this message]
2004-10-06 14:10       ` Mike Wray

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=4163FF22.4040807@hpl.hp.com \
    --to=mike.wray@hpl.hp.com \
    --cc=tfreeman@mcs.anl.gov \
    --cc=tw275@cam.ac.uk \
    --cc=xen-devel@lists.sourceforge.net \
    /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.