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] support cpupool for xl create

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] [Patch] support cpupool for xl create
From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
Date: Tue, 11 May 2010 07:47:59 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 10 May 2010 22:48:59 -0700
Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=ts.fujitsu.com; i=juergen.gross@xxxxxxxxxxxxxx; q=dns/txt; s=s1536b; t=1273556996; x=1305092996; h=message-id:date:from:mime-version:to:cc:subject: references:in-reply-to; z=Message-ID:=20<4BE8EF8F.2080802@xxxxxxxxxxxxxx>|Date:=20 Tue,=2011=20May=202010=2007:47:59=20+0200|From:=20Juergen =20Gross=20<juergen.gross@xxxxxxxxxxxxxx>|MIME-Version: =201.0|To:=20Jeremy=20Fitzhardinge=20<jeremy@xxxxxxxx> |CC:=20"xen-devel@xxxxxxxxxxxxxxxxxxx"=20<xen-devel@lists .xensource.com>|Subject:=20Re:=20[Xen-devel]=20[Patch]=20 support=20cpupool=20for=20xl=20create|References:=20<4BE3 CBCA.7080104@xxxxxxxxxxxxxx>=09<4BE48CC7.3050101@xxxxxxxx >=09<4BE7A22C.8020100@xxxxxxxxxxxxxx>=09<4BE7AAF2.50906@g oop.org>=20<4BE7AE9F.2090900@xxxxxxxxxxxxxx>=20<4BE8678C. 2060801@xxxxxxxx>|In-Reply-To:=20<4BE8678C.2060801@xxxxxx rg>; bh=UoTIh4a5SFQ0Abe+Wsk7NnpNWBP9QSjQG3yem76mKSo=; b=DUOy+vekxl4YfUtdMw8cMO7nthAi0MZbmAPyc3k3I3OJ5IWjSWWNCy7b wXWkhWWrCswhg7B2pTT738VBQ/RLKeIuAv5if/YugB2VNSiLCwYfq6azK qBV75wFITD5cLiuN8ON8HFrwxLYd7rXISUKboxVBJ9PXyazOXriul35tm P4/VWEF8rWYsLWInHIf85Vxc+IkM8ARJvD0mf3rIPfWt+d+OjuNRr4sMR Qewd4hdsUbYlhvlpaVm7mjfAb0kQe;
Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:Message-ID:Date:From:Organization: User-Agent:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type; b=vl3p04rPv1soP8Nonz8VlY2TghdRpMtpiy25pyW70vKs+AQNlin03O0z siXL3VGM4WewhyVk4Lc/WUYuyt80CbZiY5UYFAPxwnDIu5godxM2Ta7Dm NRPRo343X3PK8jNKxEi5wvvFgBhk+rTaepTHCT0ZgEcfFhRf4SkrUcd3y 7qfa0ixbkYZutZYwC+I0jMfXLup4UIFFZ7X4FoDuTkl9G76bt6jmT4aCo EI8mZ/9xeaZ/xN3ilxTT1327IWZOh;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BE8678C.2060801@xxxxxxxx>
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: Fujitsu Technology Solutions
References: <4BE3CBCA.7080104@xxxxxxxxxxxxxx> <4BE48CC7.3050101@xxxxxxxx> <4BE7A22C.8020100@xxxxxxxxxxxxxx> <4BE7AAF2.50906@xxxxxxxx> <4BE7AE9F.2090900@xxxxxxxxxxxxxx> <4BE8678C.2060801@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100411 Iceowl/1.0b1 Icedove/3.0.4
On 05/10/2010 10:07 PM, Jeremy Fitzhardinge wrote:
On 05/09/2010 11:58 PM, Juergen Gross wrote:
On 05/10/2010 08:42 AM, Jeremy Fitzhardinge wrote:
On 05/09/2010 11:05 PM, Juergen Gross wrote:
diff -r bbf009817ffb tools/libxl/libxl.c
--- a/tools/libxl/libxl.c    Fri May 07 19:22:28 2010 +0100
+++ b/tools/libxl/libxl.c    Fri May 07 14:57:00 2010 -0700
@@ -169,7 +169,8 @@

        xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/uuid", vm_path),
uuid_string, strlen(uuid_string));
        xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/name", vm_path),
info->name, strlen(info->name));
-    xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name",
vm_path), info->poolname, strlen(info->poolname));
+    if (info->poolname)
+        xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name",
vm_path), info->poolname, strlen(info->poolname));

        libxl_xs_writev(ctx, t, dom_path, info->xsdata);
        libxl_xs_writev(ctx, t, libxl_sprintf(ctx, "%s/platform",
dom_path), info->platformdata);

fixes it for me.


You seem to have specified a not existing cpupool.
The solution should not be to ignore this, but to do a proper test
on the
pool parameter.
Attached patch does this.

I'm not using cpupools.  My config makes no mention of "pool" at all.

Strange.
I tested this case and it worked for me.

Perhaps one thing that you're not testing: I'm using oxenstored, and I'm
xl without ever having started xend, so xenstore starts out completely
empty.  I don't know if that makes a difference.

It does :-)
Without proper xenstore entries it is impossible to get a cpupool name from
it's id. Id 0 is hard wired to "Pool-0", so this case can be handled even
without xenstore.
I modified the patch accordingly.


Juergen

--
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@xxxxxxxxxxxxxx
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

Attachment: libxl-poolerr.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>