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] Values of cpu_weight and cpu_cap are lost after

To: Olaf Hering <olaf@xxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] Values of cpu_weight and cpu_cap are lost after xend restart
From: "Dube, Lutz" <lutz.dube@xxxxxxxxxxxxxx>
Date: Mon, 30 Aug 2010 08:41:18 +0200
Accept-language: de-DE, en-US
Acceptlanguage: de-DE, en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 29 Aug 2010 23:42:09 -0700
Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=ts.fujitsu.com; i=lutz.dube@xxxxxxxxxxxxxx; q=dns/txt; s=s1536b; t=1283150283; x=1314686283; h=from:to:cc:date:subject:message-id:references: in-reply-to:content-transfer-encoding:mime-version; z=From:=20"Dube,=20Lutz"=20<lutz.dube@xxxxxxxxxxxxxx>|To: =20Olaf=20Hering=20<olaf@xxxxxxxxx>|CC:=20"xen-devel@list s.xensource.com"=20<xen-devel@xxxxxxxxxxxxxxxxxxx>|Date: =20Mon,=2030=20Aug=202010=2008:41:18=20+0200|Subject:=20R E:=20[Xen-devel]=20[PATCH]=20Values=20of=20cpu_weight=20a nd=20cpu_cap=20are=20lost=0D=0A=20after=20xend=20restart |Message-ID:=20<3958B14F314B884890EEE2F4CCDAB6A60113C1C49 485@xxxxxxxxxxxxxxxx>|References:=20<3958B14F314B884890EE E2F4CCDAB6A601122BF3FD52@xxxxxxxxxxxxxxxx>=0D=0A=20<20100 827125332.GA16141@xxxxxxxxx>|In-Reply-To:=20<201008271253 32.GA16141@xxxxxxxxx>|Content-Transfer-Encoding:=20base64 |MIME-Version:=201.0; bh=FLdH9ximt3K7rwsyEmHh7LUBy0d8UQaPLiaKdoinHr4=; b=ZTtlhiN71hsiJb+yF9COWp2ep3dI+E1K+044O8aGrUYqWTbYMMW0y7Ia ethN7fWOHYi7sJUSydVYytqeJpfMij39M7jh26IPPd2S58r47gp4kkpiY Kt/I03rn5UxMjpHJ+OxtUucSzt04i3c8Rt4TDnLuqafFIXH5haL0cfvz6 O1KQKL09HuUasOL0velJFXCrt/8cO3sWxTTgsSAXJXql5eD4wjH/zYaIS nt/Fpvb/fqIaAx5XWf8nyGoeVUkLn;
Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:Received:From:To:CC: Date:Subject:Thread-Topic:Thread-Index:Message-ID: References:In-Reply-To:Accept-Language:Content-Language: X-MS-Has-Attach:X-MS-TNEF-Correlator:acceptlanguage: Content-Type:Content-Transfer-Encoding:MIME-Version; b=Q6BPeIiJ5EU6Y2625kCq3GTmlMOh9L2EXNv/NAZBw0901wb6JsKZ2g3K r6S9pFlAks1Zy6TjVN/E2gl7Z/F/BsD75QU1h0QjZxaYDX2wHOletdRWy zMsTRSmY96VQxeEpIVmRmXFlC+k/xI06zBSUNiHWfZUOsU0GfNynpVeez fn2zSeFlT/d5EoYI58kWyiqUlvC/CGtjebR9lyccLluhTPVnMZ9bU/7nZ 5SJqytxBcwXZh09W83k5CAf0F6UKZ;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100827125332.GA16141@xxxxxxxxx>
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>
References: <3958B14F314B884890EEE2F4CCDAB6A601122BF3FD52@xxxxxxxxxxxxxxxx> <20100827125332.GA16141@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: ActF5uK65eylQO7jTX64j4t1WZbeMQCJK+ig
Thread-topic: [Xen-devel] [PATCH] Values of cpu_weight and cpu_cap are lost after xend restart
Hi Olaf,

yes you are right, it's my mistake. The patch is not complete. 

After reading the managed SXP file the values of weight and cap are of 
type string not of type int. 
The original code (before my patch) overwrites these values with the given 
weight/cap or 
the default values. Both values have type int.
My patch leaves the values taken from managed SXP unchanged, if already set, 
so they have type string not int!

I have to convert the values of weight/cap to int. I will extend the patch.

Thanks
Lutz


-----Original Message-----
From: Olaf Hering [mailto:olaf@xxxxxxxxx] 
Sent: Friday, August 27, 2010 2:54 PM
To: Dube, Lutz
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] Values of cpu_weight and cpu_cap are lost 
after xend restart

On Tue, Aug 10, Dube, Lutz wrote:

> # HG changeset patch
> # User Lutz.Dube
> # Node ID ca2c8c262dbaa6b2521cec60af7cd688dabdf850
> # Parent  8992134dcfd0b9e1e86f4111e68a8aa48bd33c3c
> Values of cpu_weight and cpu_cap are lost after xend restart
> 
> For managed domains in state 'halted' I always get default values
> for cpu_cap / cpu_weight after xend restart.
> This is because the names of parameters differ between a SXP file to
> create a VM (here the parameter names are cpu_cap / cpu_weight) and
> a SXP file of a managed VM (here vcpus_params (cap 0) (weight 0)).
> But XendConfig.py reads only cpu_cap / cpu_weight and if not found,
> default values are used.
> 
> The patch reads first vcpus_params (cap, weight), if not found then cpu_cap,
> cpu_weight and if both parameters are missing it uses the default values.

Lutz,

does xen-unstable actually work for you after this change is applied?
xm start <guest> fails for me on SLES11, as first reported here:
http://lists.xensource.com/archives/html/xen-devel/2010-08/msg01461.html

My python skills are not good enough to fix it, and this change looks
like the only one between rev 21976:22019 that touches self.getWeight()
related code in XendDomainInfo.py

[2010-08-27 14:36:38 4654] ERROR (XendDomainInfo:488) VM start failed
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendDomainInfo.py", line 
473, in start
    XendTask.log_progress(0, 30, self._constructDomain)
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendTask.py", line 209, in 
log_progress
    retval = func(*args, **kwds)
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendDomainInfo.py", line 
2618, in _constructDomain
    assert type(weight) == int
AssertionError

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