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-changelog

[Xen-changelog] [xen-unstable] libxl: remove xenstore /local/domain/<dom

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: remove xenstore /local/domain/<domid> after reading /vm and /vss paths
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 25 Jul 2010 01:45:30 -0700
Delivery-date: Sun, 25 Jul 2010 01:46:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1279901176 -3600
# Node ID 098dacea3ae0318e9fdec5e66f51fc1742980ead
# Parent  ef495616b946305488b445a929e842c634462f19
libxl: remove xenstore /local/domain/<domid> after reading /vm and /vss paths

On domain destroy libxl currently tries to find the /vm/<uuid> and
/vss/<uuid> paths by reading /local/domain/<domid>/{vm,vss} but does
so after removing /local/domain/<domid> which isn't much use.

Also construct the xenstore path in destroy the same way as in create. It's not
wrong but I had to look twice to check they were doing the same thing.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff -r ef495616b946 -r 098dacea3ae0 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Fri Jul 23 16:58:35 2010 +0100
+++ b/tools/libxl/libxl.c       Fri Jul 23 17:06:16 2010 +0100
@@ -773,18 +773,19 @@ int libxl_domain_destroy(struct libxl_ct
     }
     if (libxl_devices_destroy(ctx, domid, force) < 0)
         XL_LOG(ctx, XL_LOG_ERROR, "libxl_destroy_devices failed for %d", 
domid);
-    if (!xs_rm(ctx->xsh, XBT_NULL, dom_path))
-        XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", dom_path);
-
-    vm_path = libxl_xs_read(ctx, XBT_NULL, libxl_sprintf(ctx, 
"/local/domain/%d/vm", domid));
+
+    vm_path = libxl_xs_read(ctx, XBT_NULL, libxl_sprintf(ctx, "%s/vm", 
dom_path));
     if (vm_path)
         if (!xs_rm(ctx->xsh, XBT_NULL, vm_path))
             XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", vm_path);
 
-    vss_path = libxl_xs_read(ctx, XBT_NULL, libxl_sprintf(ctx, 
"/local/domain/%d/vss", domid));
+    vss_path = libxl_xs_read(ctx, XBT_NULL, libxl_sprintf(ctx, "%s/vss", 
dom_path));
     if (vss_path)
         if (!xs_rm(ctx->xsh, XBT_NULL, vss_path))
             XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", vss_path);
+
+    if (!xs_rm(ctx->xsh, XBT_NULL, dom_path))
+        XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", dom_path);
 
     xapi_path = libxl_sprintf(ctx, "/xapi/%u", domid);
     if (xapi_path)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: remove xenstore /local/domain/<domid> after reading /vm and /vss paths, Xen patchbot-unstable <=