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] Bug in xm config parsing code

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Bug in xm config parsing code
From: Tim Evers <it@xxxxxxxxxx>
Date: Tue, 14 Sep 2010 13:38:21 +0200
Delivery-date: Tue, 14 Sep 2010 04:39:09 -0700
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 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2
Hi,

I think I've found a bug in xm/create.py:

http://lists.xensource.com/archives/html/xen-changelog/2009-11/msg00132.html

introduces the "maxvcpus" parameter. It states that

"this is patch to add maxvcpus support to xen xm command. It's using
vcpu_avail bitmask and sets the number of vcpus to maxvcpus if
present.  If it's not present, old behavior is preserved."

The last part is untrue as far as I understand. If maxvcpus is unset,
vcpu_avail is not read at all. The patch removes it from the parameter
list given to add_conf without adding it in another place. As a result
vcpu_avail remains unset and is filled with the default value of 255 (?)
later.

This patch to fixes the issue for me:

--- create.py   2010-09-08 15:52:18.000000000 +0200
+++ create.py.af        2010-09-13 16:59:48.000000000 +0200
@@ -1120,8 +1120,10 @@

         # For case we don't have maxvcpus set but we have vcpus we preserve
         # old behaviour
+       # te@xxxxxxxxxxx: need to read vcpu_avail here since it isn't done 
later.
         if not maxvcpus and vcpus:
             config.append(['vcpus', vcpus])
+            config.append(['vcpu_avail', getattr(vals, 'vcpu_avail'])

     def add_conf(n):
         if hasattr(vals, n):

I would have filed a bug report for this but I have not found Xen4 on
Xen Bugzilla. Any hints on this?

Regards

Tim Evers
Artfiles GmbH

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

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