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

时间:2015-02-10 02:05:44

标签: python openstack lxc openstack-nova 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.

知道为什么会这样,任何帮助都会受到赞赏。

2 个答案:

答案 0 :(得分:0)

看起来您正在使用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

会修复这个错误,虽然因为这看起来很容易发现,我希望你会发现其他问题。

答案 1 :(得分:0)

确保文件../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建议工作。