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] Re: [PATCH 0 of 9] Call hotplug scripts from libxl

To: Roger Pau Monné <roger.pau@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH 0 of 9] Call hotplug scripts from libxl
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Tue, 4 Oct 2011 14:33:54 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 04 Oct 2011 06:34:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CAPLaKK7cbZG5SnCKdi7DaivNWmz6Ojj5NzFkQ=Wo-jL3RYEQKA@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <patchbomb.1317386580@loki> <CAPLaKK7cbZG5SnCKdi7DaivNWmz6Ojj5NzFkQ=Wo-jL3RYEQKA@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2011-10-04 at 14:24 +0100, Roger Pau Monné wrote:
> I've just realized that there's a drawback with this implementation,
> domains that are closed from inside the VM (a typical "shutdown -h
> now") do not trigger the launch of hotplug scripts, since libxl is not
> running and is not aware that the domain has powered off.

By default xl daemonises itself and monitors the domain waiting for it
to exit, at which point it should perform the necessary cleanup (this is
the call to libxl_domain_destroy in handle_domain_death).

If you ask xl to not do this (using the -e or -F options) then you are
expected to call xl destroy yourself.

The call to libxl_domain_destroy calls libxl__devices_destroy which
tears down the backends. Unfortunately this is done in a slightly
generic way but my recent series should have laid the ground work for
doing this in a more device-specific way.

I have a feeling that libxl__device_destroy should really consist of a
sequence of libxl_device_FOO_list+foreach(thing) libxl_device_FOO_remove
calls rather than the current mechanism. i.e. be really explicit about
what it is tearing down.

Ian.

>  Don't know
> the best way to solve this issue, that doesn't take us back to having
> a separate daemon that monitors xenstore states (or udev on Linux).
> 
> Regards, Roger.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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