After running install_os_domU.sh (described on https://github.com/openstack-dev/devstack/blob/master/tools/xen/README.md) I receive the following error(s) when starting nova-compute. Since I am absolutely new to python I cannot fix it by myself. The only thing I can report is: when I edit /opt/stack/nova/nova/utils.py and replace the last line (1164) with "return 1" nova-compute works and connects to my controller node. But then I can't successfully create virtual machines on this xenserver node.
2013-07-31 14:51:38.658 DEBUG nova.virt.xenapi.host [-] Updating host stats from (pid=1061) update_status /opt/stack/nova/nova/virt/xenapi/host.py:149
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/poll.py", line 97, in wait
readers.get(fileno, noop).cb(fileno)
File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 194, in main
result = function(*args, **kwargs)
File "/opt/stack/nova/nova/openstack/common/service.py", line 65, in run_service
service.start()
File "/opt/stack/nova/nova/service.py", line 174, in start
self.manager.pre_start_hook(rpc_connection=self.conn)
File "/opt/stack/nova/nova/compute/manager.py", line 786, in pre_start_hook
self.update_available_resource(nova.context.get_admin_context())
File "/opt/stack/nova/nova/compute/manager.py", line 4608, in update_available_resource
rt.update_available_resource(context)
File "/opt/stack/nova/nova/openstack/common/lockutils.py", line 246, in inner
return f(*args, **kwargs)
File "/opt/stack/nova/nova/compute/resource_tracker.py", line 259, in update_available_resource
resources = self.driver.get_available_resource(self.nodename)
File "/opt/stack/nova/nova/virt/xenapi/driver.py", line 402, in get_available_resource
hyper_ver = utils.convert_version_to_int(self._session.product_version)
File "/opt/stack/nova/nova/utils.py", line 1164, in convert_version_to_int
return version[0] * 1000000 + version[1] * 1000 + version[2]
TypeError: 'NoneType' object has no attribute '__getitem__'
Removing descriptor: 5
2013-07-31 14:51:38.995 ERROR nova.openstack.common.threadgroup [-] 'NoneType' object has no attribute '__getitem__'
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup Traceback (most recent call last):
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/openstack/common/threadgroup.py", line 117, in wait
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup x.wait()
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/openstack/common/threadgroup.py", line 49, in wait
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup return self.thread.wait()
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 168, in wait
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup return self._exit_event.wait()
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup return hubs.get_hub().switch()
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 187, in switch
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup return self.greenlet.switch()
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 194, in main
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup result = function(*args, **kwargs)
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/openstack/common/service.py", line 65, in run_service
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup service.start()
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/service.py", line 174, in start
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup self.manager.pre_start_hook(rpc_connection=self.conn)
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/compute/manager.py", line 786, in pre_start_hook
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup self.update_available_resource(nova.context.get_admin_context())
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/compute/manager.py", line 4608, in update_available_resource
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup rt.update_available_resource(context)
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/openstack/common/lockutils.py", line 246, in inner
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup return f(*args, **kwargs)
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/compute/resource_tracker.py", line 259, in update_available_resource
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup resources = self.driver.get_available_resource(self.nodename)
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/virt/xenapi/driver.py", line 402, in get_available_resource
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup hyper_ver = utils.convert_version_to_int(self._session.product_version)
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/utils.py", line 1164, in convert_version_to_int
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup return version[0] * 1000000 + version[1] * 1000 + version[2]
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup TypeError: 'NoneType' object has no attribute '__getitem__'
2013-07-31 14:51:38.995 TRACE nova.openstack.common.threadgroup
2013-07-31 14:51:38.997 DEBUG amqp [-] Closed channel #1 from (pid=1061) _do_close /usr/local/lib/python2.7/dist-packages/amqp/channel.py:88
2013-07-31 14:51:39.032 DEBUG amqp [-] Closed channel #1 from (pid=1061) _do_close /usr/local/lib/python2.7/dist-packages/amqp/channel.py:88
Looks like the xenapi driver is unable to get the product version from the host and when that happens there is no warning logged or anything, None is just returned:
https:/ /github. com/openstack/ nova/blob/ master/ nova/virt/ xenapi/ driver. py#L688
That sets the var that is passed to utils.convert_ version_ to_int.
I'm not sure why the driver can't get the product version from the host since I don't know much about the xenapi driver.