← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1307696] [NEW] deprecated method in sqlalchemy causes 500 errors in glance

 

Public bug reported:

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.

** Affects: glance
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1307696

Title:
  deprecated method in sqlalchemy causes 500 errors in glance

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1307696/+subscriptions


Follow ups

References