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

[Xen-devel] Possible bug in XendConfig.py

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Possible bug in XendConfig.py
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=W2TJLZ6SoqLb8/NkZGrCk4NEzo2PIATB2l+j2L15kU0=; b=LedTbXaP8WWP/Ugh6aSK62g8vnwM3je+uYJItfzwbiVk1yUlgKK+qoZFS6/MurCR03 X4nNLFSHwnl1msIZ9WTfK8aL4oztKZlmNP9aN7ufS/4S/GFRXpKQglLscMiReRE8+MUd mmDVico4rlQKEzBHIS3BRcez9Db7yPZNIp+No=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10
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

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