> On Sun, 5 Sep 2010 11:05:40 -0400
>
> Package: xen-utils-4.0
> Version: 4.0.1~rc6-1
> Severity: important
> Tags: patch
>
> The patch is not necessary for HVM DomU guests.
>
> The Error: 'NoneType' object has no attribute 'rfind' was fixed by installing
> xen-qemu-dm-4.0. [1]
>
>
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588888
>
Please disregard my previous three messages.
This bug applies to starting the xend daemon and bug 588888 applied to getting
the same error: 'NoneType' object has no attribute 'rfind' when calling xm
create (after xend is already running). My mistake and sorry for the noise on
messages #10/15/20.
Relevant information to this bug is the patch does resolve the issue in
xen-utils-4.0 (4.0.1~rc6-1) aswell! After applying the patch, which is not
applied in the package: xen-utils-4.0 (4.0.1~rc6-1) I was able to start the
xend daemon on my Debian Squeeze AMD64 system without getting the error:
'NoneType' object has no attribute 'rfind'.
Works when (in xend-config.sxp):
1) The configuration is the default in xen-utils-4.0 (4.0.1~rc6-1).
2) After changing:
#(xend-tcp-xmlrpc-server no)
(xend-tcp-xmlrpc-server yes)
Without further configuring
# Address and port xend should use for the legacy TCP XMLRPC interface,
# if xend-tcp-xmlrpc-server is set.
#(xend-tcp-xmlrpc-server-address 'localhost')
#(xend-tcp-xmlrpc-server-port 8006)
# SSL key and certificate to use for the legacy TCP XMLRPC interface.
# Setting these will mean that this port serves only SSL connections as
# opposed to plaintext ones.
#(xend-tcp-xmlrpc-server-ssl-key-file xmlrpc.key)
#(xend-tcp-xmlrpc-server-ssl-cert-file xmlrpc.crt)
Without the patch, the issue is still confirmed in version 4.0.1~rc6-1 with the
following trace from /var/log/xend/xend.log
[2010-09-05 11:59:52 7673] INFO (SrvDaemon:332) Xend Daemon started
[2010-09-05 11:59:52 7673] INFO (SrvDaemon:336) Xend changeset: unavailable.
[2010-09-05 11:59:53 7673] DEBUG (pci:1253) Caught TypeError 'ord() expected a
character, but string of length 0 found'
[2010-09-05 11:59:53 7673] DEBUG (XendDomainInfo:149)
XendDomainInfo.recreate({'max_vcpu_id': 1, 'cpu_time': 2000696342543L,
'ssidref': 0, 'hvm': 0, 'shutdown_reason': 255, 'dying': 0, 'online_vcpus': 2,
'domid': 0, 'paused': 0, 'crashed': 0, 'running': 1, 'maxmem_kb': 17179869180L,
'shutdown': 0, 'mem_kb': 3206400L, 'handle': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0], 'blocked': 0, 'name': 'Domain-0'})
[2010-09-05 11:59:53 7673] INFO (XendDomainInfo:167) Recreating domain 0, UUID
00000000-0000-0000-0000-000000000000. at /local/domain/0
[2010-09-05 11:59:53 7673] DEBUG (XendDomain:464) Adding Domain: 0
[2010-09-05 11:59:53 7673] DEBUG (XendDomain:398) number of vcpus to use is 0
[2010-09-05 11:59:53 7673] DEBUG (XendDomainInfo:1891)
XendDomainInfo.handleShutdownWatch
[2010-09-05 11:59:53 7673] WARNING (XendAPI:705) API call: VBD.set_device not
found
[2010-09-05 11:59:53 7673] WARNING (XendAPI:705) API call: VBD.set_type not
found
[2010-09-05 11:59:53 7673] WARNING (XendAPI:705) API call:
session.get_all_records not found
[2010-09-05 11:59:53 7673] WARNING (XendAPI:705) API call: event.get_record not
found
[2010-09-05 11:59:53 7673] WARNING (XendAPI:705) API call: event.get_all not
found
[2010-09-05 11:59:53 7673] WARNING (XendAPI:705) API call: VIF.set_device not
found
[2010-09-05 11:59:53 7673] WARNING (XendAPI:705) API call: VIF.set_MAC not found
[2010-09-05 11:59:53 7673] WARNING (XendAPI:705) API call: VIF.set_MTU not found
[2010-09-05 11:59:53 7673] WARNING (XendAPI:705) API call: debug.get_all not
found
[2010-09-05 11:59:53 7673] INFO (XMLRPCServer:156) Opening Unix domain socket
XML-RPC server on /var/run/xend/xen-api.sock; authentication has been disabled
for this server.
[2010-09-05 11:59:53 7673] INFO (XMLRPCServer:134) Opening TCP XML-RPC server
on localhost:8006.
[2010-09-05 11:59:54 7673] INFO (XMLRPCServer:156) Opening Unix domain socket
XML-RPC server on /var/run/xend/xmlrpc.sock.
[2010-09-05 12:01:59 7673] DEBUG (SrvServer:76) SrvServer.cleanup()
[2010-09-05 12:01:59 7673] DEBUG (XMLRPCServer:241) XMLRPCServer.cleanup()
[2010-09-05 12:01:59 7673] DEBUG (XMLRPCServer:241) XMLRPCServer.cleanup()
[2010-09-05 12:01:59 7673] DEBUG (XMLRPCServer:241) XMLRPCServer.cleanup()
[2010-09-05 12:01:59 7673] DEBUG (XendDomain:632) cleanup_domains
[2010-09-05 12:01:59 7672] INFO (SrvDaemon:220) Xend exited with status 0.
[2010-09-05 12:02:00 7922] INFO (SrvDaemon:332) Xend Daemon started
[2010-09-05 12:02:00 7922] INFO (SrvDaemon:336) Xend changeset: unavailable.
[2010-09-05 12:02:00 7922] DEBUG (pci:1253) Caught TypeError 'ord() expected a
character, but string of length 0 found'
[2010-09-05 12:02:01 7922] DEBUG (XendDomainInfo:149)
XendDomainInfo.recreate({'max_vcpu_id': 1, 'cpu_time': 2029664490245L,
'ssidref': 0, 'hvm': 0, 'shutdown_reason': 255, 'dying': 0, 'online_vcpus': 2,
'domid': 0, 'paused': 0, 'crashed': 0, 'running': 1, 'maxmem_kb': 17179869180L,
'shutdown': 0, 'mem_kb': 3206400L, 'handle': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0], 'blocked': 0, 'name': 'Domain-0'})
[2010-09-05 12:02:01 7922] INFO (XendDomainInfo:167) Recreating domain 0, UUID
00000000-0000-0000-0000-000000000000. at /local/domain/0
[2010-09-05 12:02:01 7922] DEBUG (XendDomain:464) Adding Domain: 0
[2010-09-05 12:02:01 7922] DEBUG (XendDomainInfo:1891)
XendDomainInfo.handleShutdownWatch
[2010-09-05 12:02:01 7922] DEBUG (XendDomain:398) number of vcpus to use is 0
[2010-09-05 12:02:01 7922] WARNING (XendAPI:705) API call: VBD.set_device not
found
[2010-09-05 12:02:01 7922] WARNING (XendAPI:705) API call: VBD.set_type not
found
[2010-09-05 12:02:01 7922] WARNING (XendAPI:705) API call:
session.get_all_records not found
[2010-09-05 12:02:01 7922] WARNING (XendAPI:705) API call: event.get_record not
found
[2010-09-05 12:02:01 7922] WARNING (XendAPI:705) API call: event.get_all not
found
[2010-09-05 12:02:01 7922] WARNING (XendAPI:705) API call: VIF.set_device not
found
[2010-09-05 12:02:01 7922] WARNING (XendAPI:705) API call: VIF.set_MAC not found
[2010-09-05 12:02:01 7922] WARNING (XendAPI:705) API call: VIF.set_MTU not found
[2010-09-05 12:02:01 7922] WARNING (XendAPI:705) API call: debug.get_all not
found
[2010-09-05 12:02:01 7922] ERROR (SrvDaemon:349) Exception starting xend
('NoneType' object has no attribute 'rfind')
Traceback (most recent call last):
File "/usr/lib/xen-4.0/bin/../lib/python/xen/xend/server/SrvDaemon.py", line
341, in run
servers = SrvServer.create()
File "/usr/lib/xen-4.0/bin/../lib/python/xen/xend/server/SrvServer.py", line
253, in create
_loadConfig(servers, root, False)
File "/usr/lib/xen-4.0/bin/../lib/python/xen/xend/server/SrvServer.py", line
233, in _loadConfig
ssl_key_file = xoptions.get_xend_tcp_xmlrpc_server_ssl_key_file()
File "/usr/lib/xen-4.0/bin/../lib/python/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
AttributeError: 'NoneType' object has no attribute 'rfind'
[2010-09-05 12:02:01 7921] INFO (SrvDaemon:220) Xend exited with status 1.
Affected file: /usr/lib/xen-4.0/lib/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