[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.