Didn't find service registered by hostname after 60 seconds

在使用最新(2018-01-05)的devstack安装AIO环境时,总是遇到如下错误:

2018-01-05 07:29:43.103 | +^[[3242mfunctions:wait_for_compute:455 ^[[m^O echo 'Didn'\''t find service registered by hostname after 60 seconds'

2018-01-05 07:29:43.103 | Didn't find service registered by hostname after 600 seconds

2018-01-05 07:29:43.129 | +^[[3242mfunctions:wait_for_compute:456 ^[[m^O openstack --os-cloud devstack-admin --os-region RegionOne compute service list

从报错中可以看出是nova-compute出了问题,无法正常启动,于是查看nova-compute的日志,发现以下报错:

1月 05 15:14:11 jpjdevstack.novalocal nova-compute[29573]: ERROR oslo_service.service [None req-8e8d9497-e9df-4cff-bda8-71143fd4edb1 None None] Error starting thread.: InternalError: Nova requires

1月 05 15:14:11 jpjdevstack.novalocal nova-compute[29573]: ERROR oslo_service.service Traceback (most recent call last):

1月 05 15:14:11 jpjdevstack.novalocal nova-compute[29573]: ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 721, in run_service

1月 05 15:14:11 jpjdevstack.novalocal nova-compute[29573]: ERROR oslo_service.service service.start()

1月 05 15:14:11 jpjdevstack.novalocal nova-compute[29573]: ERROR oslo_service.service File "/opt/stack/nova/nova/service.py", line 161, in start

1月 05 15:14:11 jpjdevstack.novalocal nova-compute[29573]: ERROR oslo_service.service self.manager.init_host()

1月 05 15:14:11 jpjdevstack.novalocal nova-compute[29573]: ERROR oslo_service.service File "/opt/stack/nova/nova/compute/manager.py", line 1141, in init_host

1月 05 15:14:11 jpjdevstack.novalocal nova-compute[29573]: ERROR oslo_service.service self.driver.init_host(host=self.host)

1月 05 15:14:11 jpjdevstack.novalocal nova-compute[29573]: ERROR oslo_service.service File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 492, in init_host

1月 05 15:14:11 jpjdevstack.novalocal nova-compute[29573]: ERROR oslo_service.service self._version_to_string(MIN_QEMU_VERSION))

1月 05 15:14:11 jpjdevstack.novalocal nova-compute[29573]: ERROR oslo_service.service InternalError: Nova requires QEMU version 2.1.0 or greater.

1月 05 15:14:11 jpjdevstack.novalocal nova-compute[29573]: ERROR oslo_service.service

此错误已经有人在launchpad上report了bug,链接如下:
https://bugs.launchpad.net/devstack/+bug/1679445

查看已安装的qemu版本,是2.6.0的,但为啥还是报这个错,很奇怪。

[stack@jpjdevstack logs]$ qemu-img --help | grep version
qemu-img version 2.6.0 (qemu-kvm-ev-2.6.0-28.el7.10.1), Copyright (c) 2004-2008 Fabrice Bellard
 conversion. If the number of bytes is 0, the source will not be scanned for

于是从google上查这个问题,有人遇到的情况跟我是一致的,发现这个链接:

https://bugzilla.redhat.com/show_bug.cgi?id=1427703

按照上面描述的方法,执行

sudo virsh -c qemu:///system version --daemon

发现结果显示部分内容如下:

Running hypervisor: QEMU 2.0.0

执行sudo yum remove qemu-system-x86,重启libvirtd,再执行

sudo virsh -c qemu:///system version --daemon,发现此时显示的版本是正常的了

重新执行devstack的stack.sh脚本,问题解决。

你可能感兴趣的:(Didn't find service registered by hostname after 60 seconds)