deprecated method in sqlalchemy causes 500 errors in glance
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://
[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-
I get a 500 error:
http://
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.
HTTPInternalSer
Doing a curl:
curl -i -X GET -H 'X-Auth-Token: blahblah' -H 'Content-Type: application/json' -H 'User-Agent: python-
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://
Doing a glance image-list, api log:
http://
Doing a glance image-create blahblahblah, registry log:
http://
Doing a glance image-create blahblahblah, api log:
http://
So, here's the registry log with sqlalchemy debug added into the mix.
* during a "glance image-list":
http://
* and during a "glance image-create blah blah < blah.img"
http://
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://
I verified the mysql connectivity works fine and i can write to the image store dir:
http://
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.
Woohoo, hacked around it.
Sqlalchemy was reporting 0.9.4 from the default module: __version_ _
[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.
'0.9.4'
>>>
Doing /usr/lib64/ python2. 6/site- packages/ SQLAlchemy- 0.8.2-py2. 6-linux- x86_64. egg
export PYTHONPATH=
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