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-users

Re: [Xen-devel] domu crash on reboot, cpus reparsed -- SOLVED

To: Daniele Palumbo <daniele@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] domu crash on reboot, cpus reparsed -- SOLVED
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Thu, 25 Jan 2007 10:32:34 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 25 Jan 2007 02:32:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200701241555.59932.daniele@xxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200701241555.59932.daniele@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Wed, Jan 24, 2007 at 03:55:59PM +0100, Daniele Palumbo wrote:

> 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 :)

Thanks for your patch.  The first hunk has been already reported, and is in
xen-unstable, but I've taken the second hunk.

Ordinarily, for patches we need you to add a line to your email like this:

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

to indicate your acceptance of the Developer's Certificate of Origin (see
http://old.linux-foundation.org/newsroom/press_releases/2004/2004_05_24_dco.html)

Your patch is so small that I've not worried about it this time, but something
to bear in mind for the future!

Thanks again,

Ewan.



> 
> bye
> d.
> 
> p.s.: is bugzilla alive?
> p.p.s.: sorry for eventual double posting, forgot attachment and posted from 
> non-subscribed mail

> # Patch to fix `xm reboot` on domu.
> # now cpus is correctly parsed.
> #
> # Idea and patch from: Daniele Palumbo <dainele@xxxxxxxxxxxx>
> # Code from: Francesco Benincasa <ciccio2000@xxxxxxxxxxxx> (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:             

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


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

<Prev in Thread] Current Thread [Next in Thread>