Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

nova fails with ImportError: No module named v1_1

I installed the OpenStack command line client following the directions here which installed python_novaclient-3.3.0.

Certain openstack CLI commands work, such as image list. For example:

openstack image list
+--------------------------------------+---------------------------------------+--------+
| ID                                   | Name                                  | Status |
+--------------------------------------+---------------------------------------+--------+
| 20d20781-66b5-432c-8317-43a54c2e2a49 | cirros-0.3.4-x86_64-uec               | active |
| 335aa6da-66be-44b2-aeef-a0e75f2e76e2 | cirros-0.3.4-x86_64-uec-ramdisk       | active |
| fc40063c-4291-4324-bce9-e3e55fe75e50 | cirros-0.3.4-x86_64-uec-kernel        | active |
| c4a9464d-7bef-49e0-88fe-67373fa76381 | cirros-0.3.4-x86_64-disk              | active |
+--------------------------------------+---------------------------------------+--------+

However, other commands fail, such as "openstack server create". The failure I get is the same failure when I run "nova image-list". For example:

nova --debug image-list
DEBUG (extension:157) found extension EntryPoint.parse('v2token = keystoneauth1.loading._plugins.identity.v2:Token')
DEBUG (extension:157) found extension EntryPoint.parse('admin_token = keystoneauth1.loading._plugins.admin_token:AdminToken')
DEBUG (extension:157) found extension EntryPoint.parse('v3oidcauthcode = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAuthorizationCode')
DEBUG (extension:157) found extension EntryPoint.parse('v2password = keystoneauth1.loading._plugins.identity.v2:Password')
DEBUG (extension:157) found extension EntryPoint.parse('v3password = keystoneauth1.loading._plugins.identity.v3:Password')
DEBUG (extension:157) found extension EntryPoint.parse('v3oidcpassword = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectPassword')
DEBUG (extension:157) found extension EntryPoint.parse('token = keystoneauth1.loading._plugins.identity.generic:Token')
DEBUG (extension:157) found extension EntryPoint.parse('v3token = keystoneauth1.loading._plugins.identity.v3:Token')
DEBUG (extension:157) found extension EntryPoint.parse('password = keystoneauth1.loading._plugins.identity.generic:Password')
DEBUG (session:248) REQ: curl -g -i -X GET http://10.169.33.11:5000/v2.0 -H "Accept: application/json" -H "User-Agent: keystoneauth1/2.3.0 python-requests/2.9.1 CPython/2.7.3"
INFO (connectionpool:207) Starting new HTTP connection (1): 10.169.33.11
DEBUG (connectionpool:387) "GET /v2.0 HTTP/1.1" 200 338
DEBUG (session:277) RESP: [200] Content-Length: 338 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache/2.4.7 (Ubuntu) Connection: Keep-Alive Date: Mon, 07 Mar 2016 21:06:20 GMT Content-Type: application/json x-openstack-request-id: req-e98a5683-7e2f-49e2-8ead-3f4d10edeeb7 
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://10.169.33.11:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

DEBUG (v2:63) Making authentication request to http://10.169.33.11:5000/v2.0/tokens
DEBUG (connectionpool:387) "POST /v2.0/tokens HTTP/1.1" 200 4143
DEBUG (session:248) REQ: curl -g -i -X GET http://10.169.33.11:8774/v2.1/31d8edd14c5b47eeb209b03dad7bc746 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}7500b525a957919e2ac33df965afa4b73a2234cc"
INFO (connectionpool:207) Starting new HTTP connection (1): 10.169.33.11
DEBUG (connectionpool:387) "GET /v2.1/31d8edd14c5b47eeb209b03dad7bc746 HTTP/1.1" 404 52
DEBUG (session:277) RESP: [404] Date: Mon, 07 Mar 2016 21:06:20 GMT Connection: keep-alive Content-Type: text/plain; charset=UTF-8 Content-Length: 52 X-Compute-Request-Id: req-eb7a8bfc-936d-425c-b8d8-c9ada4a5aa5c 
RESP BODY: 404 Not Found

The resource could not be found.



DEBUG (session:248) REQ: curl -g -i -X GET http://10.169.33.11:8774/v2.1/ -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}7500b525a957919e2ac33df965afa4b73a2234cc"
DEBUG (connectionpool:387) "GET /v2.1/ HTTP/1.1" 200 386
DEBUG (session:277) RESP: [200] Content-Length: 386 X-Compute-Request-Id: req-988c2395-0e33-4d9c-a986-237ea5ce123f Vary: X-OpenStack-Nova-API-Version Connection: keep-alive X-Openstack-Nova-Api-Version: 2.1 Date: Mon, 07 Mar 2016 21:06:20 GMT Content-Type: application/json 
RESP BODY: {"version": {"status": "CURRENT", "updated": "2013-07-23T11:33:21Z", "links": [{"href": "http://10.169.33.11:8774/v2.1/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}], "min_version": "2.1", "version": "2.12", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.compute+json;version=2.1"}], "id": "v2.1"}}

DEBUG (shell:1082) No module named v1_1
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line 1080, in main
    OpenStackComputeShell().main(argv)
  File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line 917, in main
    self.extensions = client.discover_extensions(api_version)
  File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 747, in discover_extensions
    return [ext.Extension(name, module) for name, module in chain]
  File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 756, in _discover_via_python_path
    module = module_loader.load_module(name)
  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
    mod = imp.load_module(fullname, self.file, self.filename, self.etc)
  File "/usr/local/lib/python2.7/dist-packages/os_diskconfig_python_novaclient_ext/__init__.py", line 21, in <module>
    from novaclient.v1_1 import servers
ImportError: No module named v1_1
ERROR (ImportError): No module named v1_1

I suspected this had something to do with version 3.3 of the nova client so I tried downgrading novaclient to version 2.29.0, however doing so then caused other openstack commands to fail.