From: Daniele Palumbo Subject: domu crash on reboot, cpus reparsed -- SOLVED Date: Wed, 24 Jan 2007 15:55:59 +0100 Message-ID: <200701241555.59932.daniele@retaggio.net> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_/N3tFU/nEDAay6h" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com, xen-users@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_/N3tFU/nEDAay6h Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline hi. this is true in 3.0.4, i think also in unstable but not sure. when i reboot a domu, cpus is re-parsed. but "list" type have no "split" attribute: --- File "/usr/lib/python2.4/site-packages/xen/xend/XendConfig.py", line 556, in _parse_sxp cpus = [] AttributeError: 'list' object has no attribute 'split' --- so, i made a little patch, including that one: http://lists.xensource.com/archives/html/xen-devel/2007-01/msg00599.html the point is: if(cfg[cpus]) is a list, then skip next code. seems to work for me, no crash and cpus parsed correctly. it's up to you to close the bug i have opened http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=874 or to make a better patch :) bye d. p.s.: is bugzilla alive? p.p.s.: sorry for eventual double posting, forgot attachment and posted from non-subscribed mail --Boundary-00=_/N3tFU/nEDAay6h Content-Type: text/x-diff; charset="iso-8859-1"; name="fix_cpus_parsing.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix_cpus_parsing.patch" # Patch to fix `xm reboot` on domu. # now cpus is correctly parsed. # # Idea and patch from: Daniele Palumbo # Code from: Francesco Benincasa (Many thanks) --- a/tools/python/xen/xend/XendConfig.py 2007-01-08 16:00:50.000000000 +0100 +++ b/tools/python/xen/xend/XendConfig.py 2007-01-24 15:24:57.000000000 +0100 @@ -126,6 +126,7 @@ 'memory_dynamic_min': int, 'memory_dynamic_max': int, 'memory_actual': int, + 'cpus': list, 'vcpus_policy': str, 'vcpus_params': str, 'vcpus_number': int, @@ -551,7 +552,7 @@ # "0-3,^1" -> [0,2,3] # "0-3,^1,1" -> [0,1,2,3] try: - if 'cpus' in cfg: + if 'cpus' in cfg and type(cfg['cpus']) != list: cpus = [] for c in cfg['cpus'].split(','): if c.find('-') != -1: --Boundary-00=_/N3tFU/nEDAay6h Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_/N3tFU/nEDAay6h--