All of lore.kernel.org
 help / color / mirror / Atom feed
* xm list dropping domain?
@ 2004-10-01 19:00 Tim Freeman
  2004-10-01 19:12 ` Tim Freeman
  0 siblings, 1 reply; 7+ messages in thread
From: Tim Freeman @ 2004-10-01 19:00 UTC (permalink / raw)
  To: xen-devel

I rebooted xenU from console (dom2) and exited (ctr-]).  xm list does
not report 2 anymore yet I can log into 2 via console and it is running
just fine.  Is this a bug?  I'll pull/rebuild and see what happens..
(this is xen-2.0, cset 1.1321.1.1, rh7.3 dom0/dom1)


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: xm list dropping domain?
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Tim Freeman @ 2004-10-01 19:12 UTC (permalink / raw)
  To: xen-devel

On Fri, 1 Oct 2004 14:00:45 -0500
Tim Freeman <tfreeman@mcs.anl.gov> wrote:

> I rebooted xenU from console (dom2) and exited (ctr-]).  xm list does
> not report 2 anymore yet I can log into 2 via console and it is running
> just fine.  Is this a bug?  I'll pull/rebuild and see what happens..
> (this is xen-2.0, cset 1.1321.1.1, rh7.3 dom0/dom1)

OK, I'm sorry, it eventually comes back if I repeatedly query.  What is
the criteria for being in xm list?  

I'm testing some controller code and I want to be able to poll at any
time for the status of domains no matter their state (the user could be
rebooting).  I want the code to also respond to changes in state (now,
just to log).

If I made a direct call to Xend, would it produce different information
during this window? (I assume not, though I am off to figure out how to
make direct calls..)

Thanks!

Tim


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: xm list dropping domain?
  2004-10-01 19:12 ` Tim Freeman
@ 2004-10-05 13:09   ` Mike Wray
  2004-10-05 13:25     ` Tom Wilkie
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Wray @ 2004-10-05 13:09 UTC (permalink / raw)
  To: Tim Freeman; +Cc: xen-devel

Tim Freeman wrote:

> On Fri, 1 Oct 2004 14:00:45 -0500
> Tim Freeman <tfreeman@mcs.anl.gov> wrote:
> 
> 
>>I rebooted xenU from console (dom2) and exited (ctr-]).  xm list does
>>not report 2 anymore yet I can log into 2 via console and it is running
>>just fine.  Is this a bug?  I'll pull/rebuild and see what happens..
>>(this is xen-2.0, cset 1.1321.1.1, rh7.3 dom0/dom1)
> 
> 
> OK, I'm sorry, it eventually comes back if I repeatedly query.  What is
> the criteria for being in xm list?  

It has to exist as a domain when xend asks the xen kernel about it.
During a reboot the domain actually goes away and is recreated, so
there's a window where it doesn't exist and is about to be recreated.
This is because the domain's devices have to be released and
its memory image destroyed before it can be 'rebooted'.
Xen itself doesn't know about 'reboot'.

> 
> I'm testing some controller code and I want to be able to poll at any
> time for the status of domains no matter their state (the user could be
> rebooting).  I want the code to also respond to changes in state (now,
> just to log).
> 
> If I made a direct call to Xend, would it produce different information
> during this window? (I assume not, though I am off to figure out how to
> make direct calls..)
> 

Xm just uses the direct http interface underneath so you would get the same
domain list. If you're writing a controller you would probably find it
useful to connect to xend port 8001 and read the domain events.
There you will see lifecycle events for all domains without having to poll.

Try 'telnet localhost 8001' and start/stop/reboot/migrate a domain and
you'll see the events.

In the past xen itself was in control of domain id so xend couldn't create
a domain object with the correct id until xen had made a domain - this
made it tricky to handle create/reboot because domain objects are indexed by id.

Now that xend is in control of domain id I've been thinking of rejigging it
so there is always a domain object - but even then reboot is tricky because
of destroying/recreating the devices and memory image.

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

Hope this helps,

Mike




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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: xm list dropping domain?
  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:10       ` Mike Wray
  0 siblings, 2 replies; 7+ messages in thread
From: Tom Wilkie @ 2004-10-05 13:25 UTC (permalink / raw)
  To: Mike Wray; +Cc: Tim Freeman, xen-devel

> 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.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: xm list dropping domain?
  2004-10-05 13:25     ` Tom Wilkie
@ 2004-10-05 15:08       ` Tim Freeman
  2004-10-06 14:20         ` Mike Wray
  2004-10-06 14:10       ` Mike Wray
  1 sibling, 1 reply; 7+ messages in thread
From: Tim Freeman @ 2004-10-05 15:08 UTC (permalink / raw)
  To: Tom Wilkie, Mike Wray; +Cc: xen-devel

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:

(event xend.domain.exit (gridvm1 3 reboot))
(event xend.domain.restart (gridvm1 3 schedule))
(event xend.domain.destroy (gridvm1 3))
(event xend.domain.died (gridvm1 3))
(event xend.domain.restart (gridvm1 3 begin))
(event xend.domain.create (gridvm1 3))
(event xend.domain.restart (gridvm1 3 success))
(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..


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: xm list dropping domain?
  2004-10-05 13:25     ` Tom Wilkie
  2004-10-05 15:08       ` Tim Freeman
@ 2004-10-06 14:10       ` Mike Wray
  1 sibling, 0 replies; 7+ messages in thread
From: Mike Wray @ 2004-10-06 14:10 UTC (permalink / raw)
  To: Tom Wilkie; +Cc: Tim Freeman, xen-devel

Tom Wilkie 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.
> 

I've already written a pretty complete Java interface using httpclient,
including sxpr parsing and pretty-printing. If there's interest I could make it 
available.

Mike


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: xm list dropping domain?
  2004-10-05 15:08       ` Tim Freeman
@ 2004-10-06 14:20         ` Mike Wray
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Wray @ 2004-10-06 14:20 UTC (permalink / raw)
  To: Tim Freeman; +Cc: Tom Wilkie, xen-devel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-10-06 14:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2004-10-06 14:10       ` Mike Wray

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.