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] [PATCH] libxl: do not attempt to write "shutdown" dm-com

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] libxl: do not attempt to write "shutdown" dm-command
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Wed, 19 Jan 2011 17:08:45 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 19 Jan 2011 09:09:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19767.6461.307467.213608@xxxxxxxxxxxxxxxxxxxxxxxx>
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: <19767.6461.307467.213608@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2011-01-19 at 17:02 +0000, Ian Jackson wrote:
> libxl_domain_destroy writes the command "shutdown" to the xenstore
> node with which it communicates with qemu.  However:
>  - qemu does not understand this command and ignores it (printing a
>    message)
>  - libxl doesn't wait for the answer and immediately pauses the domain
>    anyway
>  - destroy is the ungraceful (force) operation and should not
>    negotiate with qemu anyway
>  - even in the graceful shutdown case, there would actually be nothing
>    that qemu needs to do.
> 
> Under some circumstances, this entry in xenstore will survive the
> domain's death, ie be leaked.
> 
> So remove the erroneous code.
> 
> Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

Makes sense to me:

Acked/Reviewed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

> 
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index 7ffb985..2cc2d21 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -682,11 +672,6 @@ int libxl_domain_destroy(libxl_ctx *ctx, uint32_t domid, 
> int force)
>  
>      if (libxl_device_pci_shutdown(ctx, domid) < 0)
>          LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "pci shutdown failed for domid 
> %d", domid);
> -    if (dm_present) {
> -        xs_write(ctx->xsh, XBT_NULL,
> -                 libxl__sprintf(&gc, 
> "/local/domain/0/device-model/%d/command", domid),
> -                 "shutdown", strlen("shutdown"));
> -    }
>      rc = xc_domain_pause(ctx->xch, domid);
>      if (rc < 0) {
>          LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, rc, "xc_domain_pause 
> failed for %d", domid);
> 
> _______________________________________________
> 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

<Prev in Thread] Current Thread [Next in Thread>