Bug 888241
Summary: | cinder creating a bootable volume from image-id fails with 500 error from glance-api | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Eoghan Glynn <eglynn> |
Component: | openstack-packstack | Assignee: | Derek Higgins <derekh> |
Status: | CLOSED ERRATA | QA Contact: | Nir Magnezi <nmagnezi> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 2.1 | CC: | aortega, derekh, mmagr, ykaul |
Target Milestone: | snapshot2 | Keywords: | Reopened, Triaged |
Target Release: | 2.1 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | openstack-packstack-2012.2.2-0.8.dev346.el6ost | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-02-14 18:23:37 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Eoghan Glynn
2012-12-18 11:20:17 UTC
The problem occurs because the sql_connection config option is only set to a mysql URL for the glance-registry.conf, whereas the glance-api.conf remains at the default sqlite URL. When cinder tries to use the glance v2 API (which is enabled by default), the glance-api service attempts to retrieve the image metadata directly from the DB (as opposed to delegating to the glance-registry service). Since the sqlite DB has never been initialized, the images table is not found, and sqlalchemy bombs out with an operational exception which is mapped by glance to 500 ServerError response. This is only a problem in packstack-driven installs, as the glance.pp template does not override the sql_connection config for glance-api.conf. The issue does not occur when the openstack-glance-api is yum install'd directly (as opposed to being packstack'd), as the spec file sets the config appropriately: https://github.com/fedora-openstack/openstack-glance/blob/master/openstack-glance.spec#L115 Pull requests for packstack fix: https://github.com/fedora-openstack/packstack/pull/25 and also related puppetlabs-glance fix: https://github.com/puppetlabs/puppetlabs-glance/pull/65 Fix merged upstream https://github.com/fedora-openstack/packstack/commit/66a2c1f85555731ca63ca22514dffe13e4af8a5c The related puppetlabs-glance pull request was also accepted upstream: https://github.com/puppetlabs/puppetlabs-glance/commit/b08af59f Reassigning to derekh for driving brew builds etc. QE: note that the issue is with packstack and the puppet module installing Cinder, not with Cinder itself. Verified With: openstack-packstack-2012.2.2-0.5.dev318.el6ost.noarch Followed the steps in Comment #0 - 'Steps to Reproduce' and successfully created a volume. Nevertheless, While installing OpenStack with packstack - I've reopened bug #885793 - Therefore I had to configure cinder.conf manually. The fix attached above needs an addition if the glance and cinder services are running on separate hosts Fix submitted upstream https://review.openstack.org/20600 Reopening. I've found that this issue was indeed solved for some topologies, but in case: cinder, glance and keystone are on separated nodes, creating a bootable volume fails: # wget -c https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img -O //var/tmp/cirros-0.3.0-x86_64-disk.img # IMAGE_ID=$(glance image-create --name cirros --disk-format qcow2 --container-format bare --is-public 1 < /var/tmp/cirros-0.3.0-x86_64-disk.img | grep 'id' | awk '{print $4}') # cinder create --image-id $IMAGE_ID 1 ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-e54f2996-5ce5-4f00-9799-8c02cf7e40a1) The solution: add glance_host=<glance_host_ip> to cinder.conf Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2013-0204.html Verified With: openstack-packstack-2012.2.2-0.8.dev346.el6ost.noarch Followed the steps I was trying to execute on Comment #14 1. 'glance_host' was added to cinder.conf 2. I was able to create the volume. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0260.html |