Ask Your Question
0

nova image-list ERROR (KeyError): 'images'

asked 2014-07-17 06:59:39 -0500

hpasha gravatar image

updated 2014-07-18 02:25:50 -0500

I am getting the error above whenever i try to run nova image-list

endpoint is defined as:

$keystone endpoint-create --service-id=$(keystone service-list | awk '/compute / {print $2}') --publicurl=http://10.3.12.22:8774/v3.0/%\(tenant_id\)s --internalurl=http://10.3.12.22:8774/v3.0/%\(tenant_id\)s --adminurl=http://10.3.12.22:8774/v3.0/%\(tenant_id\)s

nova.conf is provided:

[DEFAULT]
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
force_dhcp_release=True
iscsi_helper=tgtadm
libvirt_use_virtio_for_bridges=True
connection_type=libvirt
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
verbose=True
ec2_private_dns_show_ip=True
api_paste_config=/etc/nova/api-paste.ini
volumes_path=/var/lib/nova/volumes
enabled_apis=ec2,osapi_compute,metadata
rpc_backend = rabbit
rabbit_host = controller
rabbit_password = seecs123
my_ip = 10.3.12.22
vncserver_listen = 10.3.12.22
vncserver_proxyclient_address = 10.3.12.22
auth_strategy = keystone

[database]
connection = mysql://nova:seecs123@10.3.12.22/nova

[keystone_authtoken]
auth_uri = http://127.0.0.1:5000
auth_host = controller
auth_port=35357
auth_protocol = http
admin_tenant_name=service
admin_user=nova
admin_password=seecs123

after purging the nova client and reinstalling it i ran the image-list again with debug:

root@openstack-HP-Compaq-8200-Elite-MT-PC:~# nova --debug --os-username=admin --os-password=seecs123 --os-tenant-name=admin --os-auth-url=http://10.3.12.22:35357/v2.0 image-list
REQ: curl -i 'http://10.3.12.22:35357/v2.0/tokens' -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "seecs123"}}}'
INFO (connectionpool:258) Starting new HTTP connection (1): 10.3.12.22
DEBUG (connectionpool:375) Setting read timeout to 600.0
DEBUG (connectionpool:415) "POST /v2.0/tokens HTTP/1.1" 200 3954
RESP: [200] CaseInsensitiveDict({'date': 'Thu, 17 Jul 2014 17:34:58 GMT', 'vary': 'X-Auth-Token', 'content-length': '3954', 'content-type': 'application/json', 'x-distribution': 'Ubuntu'})
RESP BODY: {"access": {"token": {"issued_at": "2014-07-17T17:34:58.339681", "expires": "2014-07-17T18:34:58Z", "id": "MIIHYgYJKoZIhvcNAQcCoIIHUzCCB08CAQExDTALBglghkgBZQMEAgEwggWwBgkqhkiG9w0BBwGgggWhBIIFnXsiYWNjZXNzIjogeyJ0b2tlbiI6IHsiaXNzdWVkX2F0IjogIjIwMTQtMDctMTdUMTc6MzQ6NTguMzM5NjgxIiwgImV4cGlyZXMiOiAiMjAxNC0wNy0xN1QxODozNDo1OFoiLCAiaWQiOiAicGxhY2Vob2xkZXIiLCAidGVuYW50IjogeyJkZXNjcmlwdGlvbiI6ICIiLCAiZW5hYmxlZCI6IHRydWUsICJpZCI6ICI1ZDMxNWZlNDhhYzM0YTZkODI0MWQwZTc5ODM1YzMyNiIsICJuYW1lIjogImFkbWluIn19LCAic2VydmljZUNhdGFsb2ciOiBbeyJlbmRwb2ludHMiOiBbeyJhZG1pblVSTCI6ICJodHRwOi8vMTAuMy4xMi4yMjo5MjkyIiwgInJlZ2lvbiI6ICJyZWdpb25PbmUiLCAiaW50ZXJuYWxVUkwiOiAiaHR0cDovLzEwLjMuMTIuMjI6OTI5MiIsICJpZCI6ICJjMWIyMmU0ZmRhYzg0OTUxOTBlZGE0NzM5NzY2MDMxYyIsICJwdWJsaWNVUkwiOiAiaHR0cDovLzEwLjMuMTIuMjI6OTI5MiJ9XSwgImVuZHBvaW50c19saW5rcyI6IFtdLCAidHlwZSI6ICJpbWFnZSIsICJuYW1lIjogImdsYW5jZSJ9LCB7ImVuZHBvaW50cyI6IFt7ImFkbWluVVJMIjogImh0dHA6Ly8xMC4zLjEyLjIyOjg3N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I6IFsiZTBiNGNmZGY2Y2Y5NDFkMjgwYmQ3NDhhMTcxMGIwNTEiLCAiOWZlMmZmOWVlNDM4NGIxODk0YTkwODc4ZDNlOTJiYWIiXX19fTGCAYUwggGBAgEBMFwwVzELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBVVuc2V0MQ4wDAYDVQQHDAVVbnNldDEOMAwGA1UECgwFVW5zZXQxGDAWBgNVBAMMD3d3dy5leGFtcGxlLmNvbQIBATALBglghkgBZQMEAgEwDQYJKoZIhvcNAQEBBQAEggEAJIJ014YJIzojb16ErBRTGFFqC22-88AAeAYJt1akD9L6a2-mQykjQNshEdpGFEMWNMTLaDzFlRY63D42cBWzhw4ixIKcj5P-g5bpNhSjnqeni9u8-eoNAL0eTNCeauHxH3S1yrSLPovygtVZNRmZW4EceEi6ATvb-QXvmrZ252x02AHa4poy82ClvC7ytv4OIMPRAjYmErdqQpG0b256wOutsr0T3TETKKz-GVX3vhiLbyK6yfztMrmL7iJNcqsXMnN9ilaABJHhZ6gN8xnRZ8+nMUG08VML0ZSNZ5oreGNvlT5IgeWvuPFtW5iRV4X-zfqWtKi5LgHwfVoMYG+HsQ==", "tenant": {"description": "", "enabled": true, "id": "5d315fe48ac34a6d8241d0e79835c326", "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://10.3.12.22:9292", "region": "regionOne", "internalURL": "http://10.3.12.22:9292", "id": "c1b22e4fdac8495190eda4739766031c", "publicURL": "http://10.3.12.22:9292"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://10.3.12.22:8774/v2.0/5d315fe48ac34a6d8241d0e79835c326", "region": "regionOne", "internalURL": "http://10.3.12.22:8774/v2.0/5d315fe48ac34a6d8241d0e79835c326", "id": "7666ae019b464ef9afc565c73b12201d", "publicURL": "http://10.3.12.22:8774/v2.0/5d315fe48ac34a6d8241d0e79835c326"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://10.3.12.22:35357/v2.0", "region": "regionOne", "internalURL": "http://10.3.12.22:5000/v2.0", "id": "ab74846b9d9d43a6bcad383e5a75ab6e", "publicURL": "http://10.3.12.22:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "66a713ae1afb4686a2647ec2817ed6e1", "roles": [{"name": "admin"}, {"name": "_member_"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["e0b4cfdf6cf941d280bd748a1710b051", "9fe2ff9ee4384b1894a90878d3e92bab"]}}}

REQ: curl -i 'http://10.3.12.22:8774/v2.0/5d315fe48ac34a6d8241d0e79835c326/images/detail' -X GET -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Project-Id: admin" -H "X-Auth-Token: {SHA1}aaa4af1f8def738af5b4e01f5762818f59843df1"
INFO (connectionpool:258) Starting new HTTP connection (1): 10.3.12.22
DEBUG (connectionpool:375) Setting read timeout to 600.0
DEBUG (connectionpool ...
(more)
edit retag flag offensive close merge delete

Comments

1

Is Glance correctly installed? What about command glance image-list what does it return?

Antonio G. gravatar imageAntonio G. ( 2014-07-17 07:38:18 -0500 )edit

It is correctly installed and working - it shows cirros-0.3.2-x86_64 as active

is there a way to completely remove nova and redo the installation and configuration (just nova)

hpasha gravatar imagehpasha ( 2014-07-17 08:01:54 -0500 )edit
1

you could try removing nova database (instead of reinstalling nova services) with DROP DATABASE nova; and recreate it with CREATE DATABASE nova;

Then retype the command to init the nova db:

su -s /bin/sh -c "nova-manage db sync" nova

Then restart all openstack services to see if it works.

Antonio G. gravatar imageAntonio G. ( 2014-07-17 08:16:04 -0500 )edit
1

I did that like you suggested - but now I am getting this error after i run nova image-list

ERROR (unauthorized): Unauthorized (HTTP 401)

hpasha gravatar imagehpasha ( 2014-07-17 08:43:19 -0500 )edit

Did you source the adminrc file before running the command? Do you have any error in keystone or nova log files?

Antonio G. gravatar imageAntonio G. ( 2014-07-17 08:55:42 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-01-01 06:46:30 -0500

keyur gravatar image

Gr8. Even i have faced the same issue with nova service-list . Deleted the endpoint with endpoint id and recreated new with same command as given the in the installation manual keystone endpoint-create \ --service-id $(keystone service-list | awk '/ compute / {print $2}') \ --publicurl http://controller:8774/v2/%25(tenant_id)s (http://controller:8774/v2/%(tenant_id)s) \ --internalurl http://controller:8774/v2/%25(tenant_id)s (http://controller:8774/v2/%(tenant_id)s) \ --adminurl http://controller:8774/v2/%25(tenant_id)s (http://controller:8774/v2/%(tenant_id)s) \ --region regionOne

And it worked. Thanks Liu

edit flag offensive delete link more
0

answered 2014-10-03 23:52:05 -0500

I met this problem as well and got it solved by recreate the endpoint of nova by following command (same as the installation manual).

I've delete the endpoint by using following command:

keystone endpoint-delete endpoint-id

and recreate the endpoint by following command:

keystone endpoint-create \ --service-id=$(keystone service-list | awk '/ compute / {print $2}') \ --publicurl=http://controller:8774/v2/%(tenant_id)s \ --internalurl=http://controller:8774/v2/%(tenant_id)s \ --adminurl=http://controller:8774/v2/%(tenant_id)s

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

Stats

Asked: 2014-07-17 06:59:39 -0500

Seen: 1,771 times

Last updated: Jul 18 '14