executing "nova image list" for Liberty on Ubuntu results in unexpected API error

Bug #1529533 reported by Will Auld
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Medium
Unassigned

Bug Description

Walking through the Ubuntu Liberty installation guide, at the section on verifying that nova is installed properly I go the following error:

# nova image-list

ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'glanceclient.exc.HTTPInternalServerError'> (HTTP 500) (Request-ID: req-6e1038ef-a985-43e7-a64a-899afe8e027d)
auld@controller:~/LibertyGuide$

==================
Nova version:

auld@controller:/var/log/nova$ dpkg -l | grep nova
ii nova-api 2:12.0.0-0ubuntu2~cloud0 all OpenStack Compute - API frontend
ii nova-cert 2:12.0.0-0ubuntu2~cloud0 all OpenStack Compute - certificate management
ii nova-common 2:12.0.0-0ubuntu2~cloud0 all OpenStack Compute - common files
ii nova-compute 2:12.0.0-0ubuntu2~cloud0 all OpenStack Compute - compute node base
ii nova-compute-kvm 2:12.0.0-0ubuntu2~cloud0 all OpenStack Compute - compute node (KVM)
ii nova-compute-libvirt 2:12.0.0-0ubuntu2~cloud0 all OpenStack Compute - compute node libvirt support
ii nova-conductor 2:12.0.0-0ubuntu2~cloud0 all OpenStack Compute - conductor service
ii nova-consoleauth 2:12.0.0-0ubuntu2~cloud0 all OpenStack Compute - Console Authenticator
ii nova-novncproxy 2:12.0.0-0ubuntu2~cloud0 all OpenStack Compute - NoVNC proxy
ii nova-scheduler 2:12.0.0-0ubuntu2~cloud0 all OpenStack Compute - virtual machine scheduler
ii python-nova 2:12.0.0-0ubuntu2~cloud0 all OpenStack Compute Python libraries
ii python-novaclient 2:2.30.1-1~cloud0 all client library for OpenStack Compute API
auld@controller:/var/log/nova$

Revision history for this message
Will Auld (will-auld) wrote :
Revision history for this message
Zhenzan Zhou (zhenzan-zhou) wrote :

It looks like Glance service has some issue. Could you verify if glance works? Could you also post glance logs?

Zhihai Song (szhsong)
Changed in nova:
status: New → Confirmed
assignee: nobody → Zhihai Song (szhsong)
Revision history for this message
Will Auld (will-auld) wrote :

I didn't know this when I entered the bug but /etc/glance/glance-registry.conf was missing the lines below. The script was using sed to add this but it was not working correctly. Adding these lines makes everything work. And yes, "glance image list" has worked all a long. So, it seems that if nova properly verifies this information, that should fix this bug; that is the unexpected error when this information is not properly provided.

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = xxx

Thanks

Changed in nova:
status: Confirmed → In Progress
Zhihai Song (szhsong)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
Sean Dague (sdague) wrote :

Configuration error

Changed in nova:
status: In Progress → Invalid
Revision history for this message
Zhihai Song (szhsong) wrote :

This bug report describes a situation of configuration error. But the bug still exists.
Try shutdown glance service, and do the nova image-list. An unexpected exception will occur.
So the this bug is about nova api not handling the exceptions properly.

Changed in nova:
status: Invalid → In Progress
Revision history for this message
Zhihai Song (szhsong) wrote :
Revision history for this message
Alberto Molina Coballes (alb-molina) wrote :

Found the same issue an it was solved setting project_domain_name and user_domain_name instead project_domain_id and user_domain_id

[keystone_authtoken]
...
project_domain_name = default
user_domain_name = default

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/262363
Reason: This patch is quite old, so I am abandoning it to keep the review queue manageable. Feel free to restore the change if you're still interested in working on it.

Revision history for this message
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing
the status back to the previous state and unassigning. If
there are active reviews related to this bug, please include
links in comments.

Changed in nova:
status: In Progress → Invalid
assignee: Zhihai Song (szhsong) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.