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

[Xen-devel] Possible bug in XendConfig.py


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Alexander Fittkau <alexander.fittkau@xxxxxxxxxxxxxx>
  • Date: Fri, 17 Jun 2011 13:04:21 +0200
  • Delivery-date: Fri, 17 Jun 2011 04:06:21 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=MNAkb0OyQ8mlOuUOGwRu8VVmqVB+C4LfklRj2Fwk6cs8YUWPpWgpZP+QtKD47zMdwS 5gZ/uHyoRsfzfQotafc1yQvanMUoa0Ce+db+ppV4/PP6Ru5SEG5xq+d3x/Jwy3/MwVPF o6ELVOeyzq0eV38mJ1kJEott7bqyB4WkB8abQ=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi, all!

While poking around in various Xend*.py sources (Xen 4.0.1, Debian
Squeeze) I discovered a possible Bug in XendConfig.py. More precisely in
the method to_sxp of the class XendConfig. It exposes an optional
parameter "domain=None". But further checks regarding the presence of
this parameter check against member-functions such as domain.getDomid()
or domain._stateGet() which raise an Exception if the parameter is
'None'. The docstring states that this parameter is optional, but
further handling of it either suggest it is not, or the checks are
mistakenly made against methods of 'domain' instead of domain itself.

The offending lines of code in XendConfig.py are:

1095: check against domain.getDomid()

1135: Usage of domain._stateGet()

1137: check against domain.getDomid()

In line 1140 the check is correctly made against 'domain' itself and the corresponding if-block only executes if domain was set.

Is this patched in newer versions, can I just add the correct checks or will this break something somewhere else?

Regards,
Alx.

_______________________________________________
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®.