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: include domain id in userdata path

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: include domain id in userdata path.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Sep 2010 14:40:20 -0700
Delivery-date: Fri, 10 Sep 2010 14:41:37 -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 1283882107 -3600
# Node ID a515de5479439655fb2f879459300eccce35a95c
# Parent  07294dbc4bb2f0bbc95909cfaf7a1a24a92eb627
libxl: include domain id in userdata path.

The userdata is specific to a particular incarnation of a domain and
the patch is therefor required to be unique to each incarnation. If
the user has explicitly configured a UUID in their domain
configuration then the path is no longer unique since
22124:22366e13f76d "xl: randomly generate UUIDs" which (correctly)
caused the uuid domain configuration option to be obeyed.

If userdata is not unique to each incarnation of a domain then
localhost live migration is broken because the target is created (and
writes its userdata) before the sender destroys the domain (and
deletes its userdata).

Strictly speaking I think the UUID is unnecessary but it is perhaps
helpful to people looking in the userdata directory, for debugging
etc.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_dom.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 07294dbc4bb2 -r a515de547943 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c   Tue Sep 07 18:50:55 2010 +0100
+++ b/tools/libxl/libxl_dom.c   Tue Sep 07 18:55:07 2010 +0100
@@ -466,8 +466,8 @@ static const char *userdata_path(libxl_g
     uuid_string = libxl_sprintf(gc, LIBXL_UUID_FMT, 
LIBXL_UUID_BYTES(info.uuid));
 
     path = libxl_sprintf(gc, "/var/lib/xen/"
-                         "userdata-%s.%s.%s",
-                         wh, uuid_string, userdata_userid);
+                         "userdata-%s.%u.%s.%s",
+                         wh, domid, uuid_string, userdata_userid);
     if (!path)
         XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "unable to allocate for"
                      " userdata 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: include domain id in userdata path., Xen patchbot-unstable <=