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: xen-devel@lists.sourceforge.net
Subject: Re: Re: xm list dropping domain?
Date: Tue, 05 Oct 2004 14:09:43 +0100	[thread overview]
Message-ID: <41629D17.7020502@hpl.hp.com> (raw)
In-Reply-To: <20041001141257.7e705526@prana-bindu>

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

  reply	other threads:[~2004-10-05 13:09 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 [this message]
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

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=41629D17.7020502@hpl.hp.com \
    --to=mike.wray@hpl.hp.com \
    --cc=tfreeman@mcs.anl.gov \
    --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.