Openstack、Nova 和 --help: "Could not load EntryPoint.parse" 错误

Openstack, Nova and --help: "Could not load EntryPoint.parse" error

设置

我已经在我的 Ubuntu 14.04 LTS,64 位上安装了 devstack,使用来自官方仓库的最新版本。

问题

每当我在终端中运行 openstack --help时,用法,描述和可选参数都正常显示,但除了2~4个命令之外的所有命令都显示如下:

Could not load EntryPoint.parse('server_show = openstackclient.compute.v2.server:ShowServer')
Could not load EntryPoint.parse('server_ssh = openstackclient.compute.v2.server:SshServer')
Could not load EntryPoint.parse('server_suspend = openstackclient.compute.v2.server:SuspendServer')

运行 openstack --debug --help 表明这些问题的根源 似乎 是 python 的版本冲突(所有命令共享最后两行):

Could not load EntryPoint.parse('backup_list = openstackclient.volume.v1.backup:ListBackup')
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cliff/help.py", line 22, in __call__
factory = ep.load()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2369, in load
    self.require(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2386, in require
    items = working_set.resolve(reqs, env, installer)
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 851, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
VersionConflict: (python-neutronclient 3.0.0 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('python-neutronclient<3,>=2.6.0'))
Could not load EntryPoint.parse('backup_restore = openstackclient.volume.v1.backup:RestoreBackup')

尝试解决

我仔细检查过,我安装了 python 2.7.6 和 3.4.3。根据 this answer to an unrelated question,我设置了 alias python=python2,但这似乎没有任何改变。退回 alias python=python3 也无济于事。 (别名有效,因为 python --version 显示正确的版本号。)

我找到了另一个人 with the exact same problem,但没有人对他们的 post 发表评论。

我怀疑此错误可能是 configuration/installation 问题的征兆,该问题会导致其他基本命令显示异常行为。有什么办法可以解决吗?

https://github.com/openstack/requirements/commit/840d85eb5301cc63225f1fd7fbdb4f9ca2cc8489 更新了 python-neutronclient 到 ===3.1.0,这发生在 9 月 23 日,这意味着 master 和 stable/liberty 都有这样的变化,stable/kilo 已将其固定到 2.6.0。不知道你用的是什么版本,最新的是什么意思