Ask Your Question
0

nova list not working

asked 2016-11-16 09:46:19 -0500

DarkKnight gravatar image

updated 2016-11-19 07:12:45 -0500

I have installed a mitaka setup openstack with compute and controller on the same node. Whenever i try to execute any nova command line utilities i am getting the below error.

====

[root@localhost ~(keystone_admin)]# nova list
ERROR (AttributeError): 'unicode' object has no attribute 'get'
[root@localhost ~(keystone_admin)]#

===== When i tried to use --debug option , i am seeing that this http request is returning me a 404 error message.

=====

DEBUG (session:342) REQ: curl -g -i -X GET http://10.1.10.22:8774/v2/83ac35d687fe49fba704dac8c78d4392 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}759868f2d8125f6e8148fbeba69957ba417c408c"
INFO (connectionpool:214) Starting new HTTP connection (1): 10.1.10.22
DEBUG (connectionpool:401) "GET /v2/83ac35d687fe49fba704dac8c78d4392 HTTP/1.1" 404 112
DEBUG (session:371) RESP: [404] Content-Length: 112 Content-Type: application/json; charset=UTF-8 X-Compute-Request-Id: req-a8140655-a1b5-442c-aae6-3f0595af1f4f Date: Wed, 16 Nov 2016 15:36:03 GMT Connection: keep-alive
RESP BODY: {"message": "The resource could not be found.<br /><br />\n\n\n", "code": "404 Not Found", "title": "Not Found"}

==========

My nova services and httpd server (which runs the keystone is up and running)

[root@localhost ~(keystone_admin)]# openstack-service status nova
MainPID=2541 Id=openstack-nova-api.service ActiveState=active
MainPID=2452 Id=openstack-nova-cert.service ActiveState=active
MainPID=2485 Id=openstack-nova-compute.service ActiveState=active
MainPID=2462 Id=openstack-nova-conductor.service ActiveState=active
MainPID=2481 Id=openstack-nova-console.service ActiveState=active
MainPID=2483 Id=openstack-nova-consoleauth.service ActiveState=active
MainPID=2398 Id=openstack-nova-novncproxy.service ActiveState=active
MainPID=2477 Id=openstack-nova-scheduler.service ActiveState=active
MainPID=2409 Id=openstack-nova-xvpvncproxy.service ActiveState=active

[root@localhost ~(keystone_admin)]#

[root@localhost ~(keystone_admin)]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─openstack-dashboard.conf
   Active: active (running) since Wed 2016-11-16 21:03:57 IST; 8min ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 47682 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
  Process: 18549 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
  Process: 47807 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force (code=exited, status=0/SUCCESS)
  Process: 47793 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear (code=exited, status=0/SUCCESS)
 Main PID: 47891 (httpd)
   Status: "Total requests: 435; Current requests/sec: 0.8; Current traffic: 921 B/sec"
   CGroup: /system.slice/httpd.service
           ├─  324 keystone-admin  -DFOREGROUND
           ├─  341 keystone-admin  -DFOREGROUND
           ├─  342 keystone-admin  -DFOREGROUND
           ├─  392 keystone-admin  -DFOREGROUND
           ├─  575 keystone-main   -DFOREGROUND
           ├─  576 keystone-main   -DFOREGROUND
           ├─  603 keystone-main   -DFOREGROUND
           ├─  604 keystone-main   -DFOREGROUND
           ├─  608 keystone-main   -DFOREGROUND
           ├─  667 keystone-main   -DFOREGROUND
           ├─  692 keystone-main   -DFOREGROUND
           ├─  713 keystone-main   -DFOREGROUND
           ├─  751 keystone-main   -DFOREGROUND
           ├─  752 keystone-main   -DFOREGROUND
           ├─  810 keystone-main   -DFOREGROUND
           ├─  811 keystone-main   -DFOREGROUND
           ├─  833 keystone-main   -DFOREGROUND
           ├─  839 keystone-main   -DFOREGROUND
           ├─  864 keystone-main   -DFOREGROUND
           ├─  867 keystone-main   -DFOREGROUND
           ├─  868 keystone-main   -DFOREGROUND
           ├─  892 keystone-main   -DFOREGROUND
           ├─  995 keystone-main   -DFOREGROUND
           ├─ 1022 keystone-main   -DFOREGROUND
           ├─ 1044 keystone-main   -DFOREGROUND
           ├─ 1129 keystone-main   -DFOREGROUND
           ├─ 1345 keystone-main   -DFOREGROUND
           ├─ 1362 keystone-main   -DFOREGROUND
           ├─ 1415 /usr/sbin/httpd -DFOREGROUND
           ├─ 1416 /usr/sbin/httpd -DFOREGROUND
           ├─ 1417 /usr/sbin/httpd -DFOREGROUND
           ├─ 1449 /usr/sbin/httpd -DFOREGROUND
           ├─ 1466 /usr/sbin/httpd -DFOREGROUND
           ├─ 1467 ...
(more)
edit retag flag offensive close merge delete

Comments

Hi, -can you check/attach logs from var/log/nova? -can you take a look at database? At least: mysql nova; show tables; and maybe go and check some tables

volenbovsky gravatar imagevolenbovsky ( 2016-11-16 09:52:20 -0500 )edit

MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | aodh | | cinder | | glance | | gnocchi | | heat | | information_schema | | ironic | | keystone | | mysql

DarkKnight gravatar imageDarkKnight ( 2016-11-16 10:14:02 -0500 )edit

2 answers

Sort by » oldest newest most voted
0

answered 2016-11-16 21:09:35 -0500

silently gravatar image

you can use this get more information:

nova --debug list


I guess :

uninstall nova-client, then   install right version python-novaclient-x.y.z for nova server .

or reinstall         python-requests python3-requests
edit flag offensive delete link more

Comments

2016-11-19 14:30:28.528 30779 INFO nova.osapi_compute.wsgi.server [req-8d6c8313-bce8-4fd3-acb2-ba2bfa246c26 5febd1e767a84492b138a74ad1ee9af2 83ac35d687fe49fba704dac8c78d4392 - - -] 10.1.10.22 "GET /v2/83ac35d687fe49fba704dac8c78d4392 HTTP/1.1" status: 404 len: 331 time: 0.3042910

DarkKnight gravatar imageDarkKnight ( 2016-11-19 03:06:54 -0500 )edit

getting a 404 against GET /v2/83ac35d687fe49fba704dac8c78d4392, where 83ac35d687fe49fba704dac8c78d4392 is the admin tenant id. Any idea why is 404 coming. Where to debug? I am stuck with this issue for 2 weeks

DarkKnight gravatar imageDarkKnight ( 2016-11-19 03:08:23 -0500 )edit

Like SDL, I think this is a version mismatch. Try reinstalling the nova client.

Instead of the nova client, you can also use openstack server list.

Bernd Bausch gravatar imageBernd Bausch ( 2016-11-19 07:41:58 -0500 )edit
0

answered 2016-11-19 12:43:08 -0500

volenbovsky gravatar image

From your comment above I can only see that Nova database is absent. It should be there and populated (once nova-manage db_sync is executed) I am not sure how you installed OpenStack - manually or using something like Devstack/Packstack... In case you used any of tools - check the logs of them, those should be doing necessary database-related stuff. Otherwise - check something http://docs.openstack.org/mitaka/inst... and do CREATE DATABASE nova; etc.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-11-16 09:46:19 -0500

Seen: 868 times

Last updated: Nov 19 '16