使用 devstack 安装时启动 OPenstack Nova 时出现问题

Issue in starting OPenstack Nova while installing using devstack

nova 尝试启动时出现以下问题。

/usr/local/bin/nova-compute --config-file /etc/nova/nova.conf
cloud@CloudServer:/opt/stack/devstack$ /usr/local/bin/nova-compute --config-file /etc/nova/nova.conf

2015-02-10 07:26:42.226 DEBUG nova.servicegroup.api [-] ServiceGroup driver defined as an instance of db from (pid=3411) __new__ /opt/stack/nova/nova/servicegroup/api.py:65
2015-02-10 07:26:53.201 INFO nova.openstack.common.periodic_task [-] Skipping periodic task _periodic_update_dns because its interval is negative
2015-02-10 07:26:58.820 INFO nova.virt.driver [-] Loading compute driver 'ncflex.nova.virt.flex.LXCDriver'
2015-02-10 07:27:02.860 ERROR nova.virt.driver [-] Unable to load the virtualization driver
2015-02-10 07:27:02.860 TRACE nova.virt.driver Traceback (most recent call last):
2015-02-10 07:27:02.860 TRACE nova.virt.driver   File "/opt/stack/nova/nova/virt/driver.py", line 1402, in load_compute_driver
2015-02-10 07:27:02.860 TRACE nova.virt.driver     virtapi)
2015-02-10 07:27:02.860 TRACE nova.virt.driver   File "/opt/stack/nova/nova/openstack/common/importutils.py", line 52, in import_object_ns
2015-02-10 07:27:02.860 TRACE nova.virt.driver     return import_class(import_str)(*args, **kwargs)
2015-02-10 07:27:02.860 TRACE nova.virt.driver   File "/usr/local/lib/python2.7/dist-packages/ncflex/nova/virt/flex/driver.py", line 46, in __init__
2015-02-10 07:27:02.860 TRACE nova.virt.driver     self.containers = containers.Containers(virtapi)
2015-02-10 07:27:02.860 TRACE nova.virt.driver   File "/usr/local/lib/python2.7/dist-packages/ncflex/nova/virt/flex/containers.py", line 73, in __init__
2015-02-10 07:27:02.860 TRACE nova.virt.driver     vif_class = importutils.import_class(CONF.lxc.vif_driver)
2015-02-10 07:27:02.860 TRACE nova.virt.driver   File "/opt/stack/nova/nova/openstack/common/importutils.py", line 27, in import_class
2015-02-10 07:27:02.860 TRACE nova.virt.driver     __import__(mod_str)
2015-02-10 07:27:02.860 TRACE nova.virt.driver   File "/usr/local
/lib/python2.7/dist-packages/ncflex/nova/virt/flex/vifs.py", line 23, in <module>
2015-02-10 07:27:02.860 TRACE nova.virt.driver     from nova import processutils
2015-02-10 07:27:02.860 TRACE nova.virt.driver ImportError: cannot import name processutils
2015-02-10 07:27:02.860 TRACE nova.virt.driver 
cloud@CloudServer:/opt/stack/devstack$

ImportError: cannot import name processutils.

知道为什么会发生这种情况,我们将不胜感激。

看起来您正在使用 nova-compute-flex 驱动程序,它既不是 (a) 官方 OpenStack 项目,也不是 (b) 默认包含在 devstack 中。

查看错误:

TRACE nova.virt.driver     from nova import processutils
TRACE nova.virt.driver ImportError: cannot import name processutils

这似乎是 flex 驱动程序中的错误。例如,如果您在 ncflex/nova/virt/flex/volumes.py 中查看,您会看到:

from nova.openstack.common import processutils

这很好用。有可能修改 vifs.py 以替换:

from nova import processutils

有:

from nova.openstack.common import processutils

会修复该错误,虽然这看起来很容易发现,但我希望您会发现其他问题。

确保文件 ../stack/nova/openstack-common.conf 有一个条目
模块=processutils
几天前的条目
模块=日志
已从 openstack-common.conf
中删除 同时我得到:-
n-cpu screen log with error for import - from nova.openstack.common import log
与此同时,我在 openstack-common.conf.
中没有看到您需要的条目 请回复 larsks 的建议对你有用吗。