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/
Home Products Support Community News


Re: [Xen-devel] Domains not being destroyed properly

On Fri, 2011-06-24 at 15:15 +0100, Anthony Wright wrote:
> On 24/06/2011 14:45, Ian Campbell wrote:
> > On Fri, 2011-06-24 at 13:54 +0100, Anthony Wright wrote:
> >> A reaper would have to maintain a list of domains as they were before the
> >> notification to compare against the list after the notification to be
> >> able to issue a notification for the domain that has died. If that list
> >> got out of sync it would start issuing incorrect domain death 
> >> notifications.
> > You don't need to maintain a list, simply call libxl_list_domain() and
> > for each returned domain examine the flags and shutdown reason to
> > determine if it is dead (and why), dying or still running.
> >
> > Since you are explicitly arranging that nothing else will destroy
> > domains once they die so they will always be in that list when you get
> > to them.
> My original thought on reaper was that it was only responsible for
> helping notify user space applications of a domain's death,  but you
> seem to be suggesting that it should also be responsible for tidying up
> after a domain death as well. Isn't some other part of the system
> already fulfilling this role?

It would be xl, but you are using xl create -e which explicitly turns
off that behaviour.

> It seems that for 'xl create' this tidy up is already being done, and I
> had presumed the code for 'xl create -e' tidy up already exists but
> wasn't working correctly.

No, "xl create -e" means "don't babysit this domain waiting for it to
die. I, the user, will take care of cleaning it up manually when it

You said you were using -e because you didn't want a load of processes
sitting around to fulfil this requirement and so I suggested you might
like a single reaper daemon which takes case of it instead.


>  If you're saying the 'xl create -e' tidy up
> code needs to be written, that's probably beyond my knowledge of xen,
> and in any case I'm not sure it should be in reaper. Reaper should
> notify user space of any domain destruction whether created by 'xl
> create -e' or 'xl create'. If reaper did the tidy up for 'xl create -e'
> it would have access to information needed to pass to the user space
> applications, however for an 'xl create' domain death this information
> may no longer be available since 'xl create' may have already tidied up.

Xen-devel mailing list