deprecated method in sqlalchemy causes 500 errors in glance

Bug #1307696 reported by Will Dunn
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Won't Fix
Undecided
Unassigned

Bug Description

I'm working on setting up Havana on CentOS 6.5, bare metal. I'm using http://docs.openstack.org/havana/install-guide/install/yum/content/glance-verify.html for my install doc.

[root@fw1 ~]# glance --version
0.12.0

When I tried to load the test image into glance:
glance image-create --name="CirrOS 0.3.1" --disk-format=qcow2 \
  --container-format=bare --is-public=true < cirros-0.3.1-x86_64-disk.img
I get a 500 error:
http://pastie.org/private/l9hzbuacftyt9ashgt7ang

I poked around, and discovered that I also get the same 500 error when I do a
glance image-list:
[root@box images]# glance image-list
Request returned failure status.
HTTPInternalServerError (HTTP 500)

Doing a curl:
curl -i -X GET -H 'X-Auth-Token: blahblah' -H 'Content-Type: application/json' -H 'User-Agent: python-glanceclient' http://192.168.20.1:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20
returns:
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain
Content-Length: 0
Date: Sun, 13 Apr 2014 19:44:51 GMT
Connection: close

So, I bumped up to debug output for both the registry and api, and this is what
I've got:
Doing a glance image-list, registry log:
http://pastie.org/private/cshdglpjxasmitl480ljq
Doing a glance image-list, api log:
http://pastie.org/private/wkceq0bdrunsvvm9qemdow
Doing a glance image-create blahblahblah, registry log:
http://pastie.org/private/xxetsfl0nopcaszvsiemw
Doing a glance image-create blahblahblah, api log:
http://pastie.org/private/jmsa5y30xn6xpay77weea
So, here's the registry log with sqlalchemy debug added into the mix.
 * during a "glance image-list":
http://pastie.org/private/gwkvnzh6n3o0koka5ohw
 * and during a "glance image-create blah blah < blah.img"
http://pastie.org/private/yqzjb7lg2odnevnzof67zg

Also, I tried to drop and recreate the database using:
openstack-db --drop --service glance
openstack-db --init --service glance --password glance
(yeah, simple passwords, it's internal use only)
and I got the following error output:
http://hastebin.com/xanutudafa.md

I verified the mysql connectivity works fine and i can write to the image store dir:
http://pastie.org/private/vsnijulitckjhkg1tkwlnq

After discussion with some devs, it seems likely that there's something inconsistent with the way that package was built: the call is being made to a deprecated method in sqlalchemy and the migration (db_sync) does not seem to be happening successfully, causing the 500's.

Revision history for this message
Will Dunn (wdunn) wrote :

Woohoo, hacked around it.

Sqlalchemy was reporting 0.9.4 from the default module:
[root@fw1 ~]# python
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlalchemy
>>> sqlalchemy.__version__
'0.9.4'
>>>

Doing
export PYTHONPATH=/usr/lib64/python2.6/site-packages/SQLAlchemy-0.8.2-py2.6-linux-x86_64.egg

to basically force 0.8.2 allowed for the db_sync to work. image-list and other parts now work.

That's not a good, or elegant, solution, but it gets me to where I need to be.

~W

Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

Again related to v1 and no one else has encountered this issue, safe to mark as won't fix.

Changed in glance:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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