From: Andres Lagar-Cavilla <andres@lagarcavilla.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
xen-devel@lists.xensource.com
Subject: [PATCH 08/14]: libxenlight, remove vss and xapi patch on domain destroy
Date: Mon, 30 Nov 2009 14:14:37 -0500 [thread overview]
Message-ID: <4B14199D.1050307@lagarcavilla.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 129 bytes --]
When destroying domains remove xapi and vss paths
from xenstore.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.com>
[-- Attachment #2: 08_remove_vss_xapi_domain_destroy.patch --]
[-- Type: text/x-patch, Size: 1891 bytes --]
# HG changeset patch
# User Andres Lagar-Cavilla <andres@lagarcavilla.com>
# Date 1259256167 18000
# Node ID d3ee9d231f8c7eca6da0bfd443fb3e2e6c871168
# Parent 61ad75e6a95c2ee8c6cb2f18c7eaec51ea6de785
When destroying domains remove xapi and vss paths
from xenstore.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.com>
diff -r 61ad75e6a95c -r d3ee9d231f8c libxl.c
--- a/libxl.c
+++ b/libxl.c
@@ -441,7 +441,8 @@ static int libxl_destroy_device_model(st
int libxl_domain_destroy(struct libxl_ctx *ctx, uint32_t domid, int force)
{
- char *dom_path, vm_path[UUID_LEN_STR + 5];
+ char *dom_path, *uuid_str;
+ char vm_path[UUID_LEN_STR + 5], vss_path[UUID_LEN_STR + 6], xapi_path[20];
xen_uuid_t *uuid;
int rc, hvm;
@@ -474,9 +475,17 @@ int libxl_domain_destroy(struct libxl_ct
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);
- snprintf(vm_path, sizeof(vm_path), "/vm/%s", libxl_uuid_to_string(ctx, uuid));
+ uuid_str = libxl_uuid_to_string(ctx, uuid);
+ snprintf(vm_path, sizeof(vm_path), "/vm/%s", uuid_str);
if (!xs_rm(ctx->xsh, XBT_NULL, vm_path))
XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", vm_path);
+ snprintf(vss_path, sizeof(vss_path), "/vss/%s", uuid_str);
+ if (!xs_rm(ctx->xsh, XBT_NULL, vss_path))
+ XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", vss_path);
+ libxl_free(ctx, uuid_str);
+ snprintf(xapi_path, sizeof(xapi_path), "/xapi/%u", domid);
+ if (!xs_rm(ctx->xsh, XBT_NULL, xapi_path))
+ XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", xapi_path);
rc = xc_domain_destroy(ctx->xch, domid);
if (rc < 0) {
XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, rc, "xc_domain_destroy failed for %d", domid);
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2009-11-30 19:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B14199D.1050307@lagarcavilla.com \
--to=andres@lagarcavilla.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.