Ask Your Question
0

nova-compute does not start with "KeyError: 'socket_count'"

asked 2015-05-05 02:20:29 -0500

Donovan Muller gravatar image

I'm trying to get Kilo DevStack running on Xen within VirtualBox up and running. Following the guides from https://github.com/openstack-dev/devstack/blob/stable/kilo/tools/xen/README.md (here) and https://wiki.openstack.org/wiki/XenServer/VirtualBox (here) and using the https://github.com/openstack-dev/devstack/blob/stable/kilo (Kilo DevStack) zip with the following localrc file:

GIT_BASE="http://github.com"

MYSQL_PASSWORD=openstack
SERVICE_TOKEN=openstack
ADMIN_PASSWORD=openstack
SERVICE_PASSWORD=openstack
RABBIT_PASSWORD=openstack
SWIFT_HASH="66a3d6b56c1f479c8b4e70ab5c2000f5"
GUEST_PASSWORD=openstack

XENAPI_PASSWORD=openstack

XENAPI_CONNECTION_URL="http://192.168.1.101"
VNCSERVER_PROXYCLIENT_ADDRESS=192.168.1.101

IMAGE_URLS=""

VIRT_DRIVER=xenserver
MULTI_HOST=1
ACTIVE_TIMEOUT=45

OSDOMU_MEM_MB=2048
OSDOMU_VDI_GB=12

RECLONE=no

LOGFILE=/tmp/devstack/log/stack.log
SCREEN_LOGDIR=/tmp/devstack/log/

EXTRA_OPTS=("xenapi_disable_agent=True")

the stack.sh script runs successfully:

This is your host ip: 192.168.1.102
Horizon is now available at http://192.168.1.102/
Keystone is serving at http://192.168.1.102:5000/
The default users are: admin and demo
The password: openstack
+ touch /opt/stack/runsh.succeeded
+ rm /opt/stack/run_sh.pid

however, on trying to create a test instance I get the following error No valid host was found. There are not enough hosts available. On further inspection, nova-compute service is not running as can be seen http://i.imgur.com/NAzbAC8.png (here). If I look at the nova-compute logs I see the following error:

2015-05-05 06:21:58.946 INFO nova.service [-] Starting compute node (version 2015.1.1)
...
2015-05-05 06:21:59.983 DEBUG oslo_concurrency.lockutils [req-4fbed445-4d63-4665-bee6-05f2bf74691c None None] Lock "sr-scan-OpaqueRef:9d5a41bd-66d7-3088-c47f-fc30cb0ec7ee" released by "do_scan" :: held 0.586s from (pid=14360) inner /usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:456
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/poll.py", line 115, in wait
    listener.cb(fileno)
  File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 214, in main
    result = function(*args, **kwargs)
  File "/opt/stack/nova/nova/openstack/common/service.py", line 497, in run_service
    service.start()
  File "/opt/stack/nova/nova/service.py", line 183, in start
    self.manager.pre_start_hook()
  File "/opt/stack/nova/nova/compute/manager.py", line 1291, in pre_start_hook
    self.update_available_resource(nova.context.get_admin_context())
  File "/opt/stack/nova/nova/compute/manager.py", line 6237, in update_available_resource
    nodenames = set(self.driver.get_available_nodes())
  File "/opt/stack/nova/nova/virt/xenapi/driver.py", line 626, in get_available_nodes
    stats = self.host_state.get_host_stats(refresh=refresh)
  File "/opt/stack/nova/nova/virt/xenapi/driver.py", line 131, in host_state
    self._host_state = host.HostState(self._session)
  File "/opt/stack/nova/nova/virt/xenapi/host.py", line 149, in __init__
    self.update_status()
  File "/opt/stack/nova/nova/virt/xenapi/host.py", line 248, in update_status
    data.get("host_cpu_info")
  File "/opt/stack/nova/nova/virt/xenapi/host.py", line 335, in to_cpu_model
    topology["sockets"] = int(host_cpu_info["socket_count"])
KeyError: 'socket_count'
Removing descriptor: 3
2015-05-05 06:22:00.021 ERROR nova.openstack.common.threadgroup [req-77489ec0-015f-4b7a-8f0c-63ed6d2f3c2f None None] 'socket_count'
...

Has anybody got any idea why the following is breaking?

  File "/opt/stack/nova ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-05-06 05:09:23 -0500

Donovan Muller gravatar image

Ok, problem solved.

For future reference, the issue was that, according to the Wiki you must download XCP version 1.6. However, XCP is no longer maintained past 1.6 (read the Important Notice section http://www.xenproject.org/downloads/xen-cloud-platform-archives.html (here)) and you should actually download and use XenServer.

The error was probably caused by a difference in the response format from the host status information returned by the call to xenapi. You can see that https://github.com/openstack/nova/blob/stable/kilo/nova/virt/xenapi/host.py#L229 (here), which is what actually made me go down the XenServer over XCP route.

I have updated the https://wiki.openstack.org/wiki/XenServer/VirtualBox (Wiki page) to reflect this.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-05-05 02:20:29 -0500

Seen: 292 times

Last updated: May 05 '15