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] Domains not being destroyed properly

On 22/06/2011 08:56, Ian Campbell wrote:
> On Tue, 2011-06-21 at 17:04 +0100, Anthony Wright wrote:
>> On 21/06/2011 16:44, Ian Campbell wrote:
>>> If you don't want to run an xl daemon for each domain (although I agree
>>> with IanJ that they should be pretty cheap) I think a new xl sub-command
>>> which caused it to behave as a single daemon reaping domains would be a
>>> fine thing to have in our toolkit.
>> That would be really helpful, something that would inform me when a
>> domain died supplying it's domain id & domain name - the name is really
>> important because that's my reference, and I can't convert from an
>> domain id to a domain name after the domain has died.
> In this case I think you can do so before the call to "xl destroy" since
> that is when all the xenstore gubbins needed to do the translation is
> called. In the past xend probably got their before you could and nuked
> it all.
>
> BTW, I was trying to imply that we would accept a patch which
> implemented this new subcommand ;-)
The problem is that I don't think there's enough information available
from watching @releaseDomain to implement a reaper well. The
xenstore-watch on @releaseDomain only tells you that a domain has died
(to make things more complicated I actually get two notifications when a
domain get's shutdown), it doesn't tell you which domain has died. 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.

Looking at the watch code while the code in xenstored_domain has the
domain id & name available, there doesn't seem to be the ability to be
able to add arguments to @releaseDomain to let it tell the watchers
which domain has been released to avoid having to maintain this list.

Therefore the simplest change would seem to be to modify
xenstored_domain.c so that if a script existed (e.g.
/etc/xen/scripts/domain-destroyed) at domain destruction this script was
called with the domain id & name as arguments. Would it be acceptable?

Anthony.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel