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

Re: [Xen-devel] [PATCH][RESENT] xend: fix bug in xend option parsing

To: Arnd Hannemann <hannemann@xxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][RESENT] xend: fix bug in xend option parsing
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 17 May 2010 10:59:47 +0100
Cc:
Delivery-date: Mon, 17 May 2010 03:01:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BF06503.2000600@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
Thread-index: Acr1P79bDRaVd8ZfQxyUTSL6lvw7SAAZ+8vo
Thread-topic: [Xen-devel] [PATCH][RESENT] xend: fix bug in xend option parsing
User-agent: Microsoft-Entourage/12.24.0.100205
Patch was applied a week ago.

 -- Keir

On 16/05/2010 22:34, "Arnd Hannemann" <hannemann@xxxxxxxxxxxxxxxxxxx> wrote:

> Resent of mail sent on 28.04.
> 
> 
> xend: fix bug in option parsing
> 
> If you enable legacy tcp xmlrpc in xend's config but omit to enable ssl
> the following backtrace is generated when starting xend:
> 
> [2010-04-28 16:09:04 15754] ERROR (SrvDaemon:349) Exception starting xend
> ('NoneType' object has no attribute 'rfind')
> Traceback (most recent call last):
>   File "usr/lib/python2.5/site-packages/xen/xend/server/SrvDaemon.py", line
> 341, in run
>     servers = SrvServer.create()
>   File "usr/lib/python2.5/site-packages/xen/xend/server/SrvServer.py", line
> 253, in create
>     _loadConfig(servers, root, False)
>   File "usr/lib/python2.5/site-packages/xen/xend/server/SrvServer.py", line
> 233, in _loadConfig
>     ssl_key_file = xoptions.get_xend_tcp_xmlrpc_server_ssl_key_file()
>   File "usr/lib/python2.5/site-packages/xen/xend/XendOptions.py", line 210, in
> get_xend_tcp_xmlrpc_server_ssl_key_file
>     if os.path.dirname(file) == "":
>   File "/usr/lib/python2.5/posixpath.py", line 119, in dirname
>     return split(p)[0]
>   File "/usr/lib/python2.5/posixpath.py", line 77, in split
>     i = p.rfind('/') + 1
> 
> This patch fixes above bug.
> Patch should be considered for 4.0.x as the bug is present in release 4.0.0.
> 
> Signed-off-by: Arnd Hannemann <hannemann@xxxxxxxxxxxxxxxxxxx>
> 
> diff -r 9a1d7caa2024 -r 0d3979903bac tools/python/xen/xend/XendOptions.py
> --- a/tools/python/xen/xend/XendOptions.py Mon Apr 26 12:13:23 2010 +0100
> +++ b/tools/python/xen/xend/XendOptions.py Wed Apr 28 16:54:04 2010 +0200
> @@ -207,18 +207,18 @@
>      def get_xend_tcp_xmlrpc_server_ssl_key_file(self):
>          name = 'xend-tcp-xmlrpc-server-ssl-key-file'
>          file = self.get_config_string(name)
> -        if os.path.dirname(file) == "":
> +        if file and os.path.dirname(file) == "":
>              file = auxbin.xen_configdir() + '/' + file;
> -        if not os.path.exists(file):
> +        if file and not os.path.exists(file):
>              raise XendError("invalid xend config %s: directory '%s' does not
> exist" % (name, file))
>          return file
> 
>      def get_xend_tcp_xmlrpc_server_ssl_cert_file(self):
>          name = 'xend-tcp-xmlrpc-server-ssl-cert-file'
>          file = self.get_config_string(name)
> -        if os.path.dirname(file) == "":
> +        if file and os.path.dirname(file) == "":
>              file = auxbin.xen_configdir() + '/' + file;
> -        if not os.path.exists(file):
> +        if file and not os.path.exists(file):
>              raise XendError("invalid xend config %s: directory '%s' does not
> exist" % (name, file))
>          return file
> 



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

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