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] [PATCH] xend - Have parseConfig check configuration options

To: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] xend - Have parseConfig check configuration options
From: Daniel Stekloff <dsteklof@xxxxxxxxxx>
Date: Thu, 22 Sep 2005 13:14:44 -0700
Delivery-date: Thu, 22 Sep 2005 20:12:49 +0000
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/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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This patch adds a check in parseConfig() to see if certain config
options are valid, it sets defaults if they aren't. I realize that some
of these defaults are set by xm - like "name". I think, however, it's a
good idea for xend to check too.

The recent bug 246 was solved first by putting a check in initDomain to
see if "cpu" was None and then by only using "cpu" if there's a value.

http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=246

Currently, the configuration options are dealt with in xm and then in
different areas within xend. Shouldn't xend check for options and assign
default values in one spot for easy maintenance? Shouldn't it check when
it runs parseConfig? 

Also, it's possible for get_cfg(), which is in parseConfig(), to return
None for some options that aren't defined in the config file - like
"cpu". The "if conv and not val is None:" check won't hit val == None
and then get_cfg() returns val. 

I will look at making the options consistent, if this is agreeable. 

Signed-off-by: Daniel Stekloff <dsteklof@xxxxxxxxxx>



Attachment: parseConfig_check_options.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>