首页 > 代码库 > 3.      Can not upload image and get error “Glance - HTTPInternalServerError (HTTP 500)”

3.      Can not upload image and get error “Glance - HTTPInternalServerError (HTTP 500)”

In glace-regiter.log

  File"/usr/lib/python2.6/site-packages/glance/openstack/common/db/sqlalchemy/session.py",line 461, in _wrap

    raise exception.DBError(e)

DBError: (ProgrammingError) (1146, "Table ‘glance.images‘ doesn‘t exist")‘INSERT INTO images (created_at, updated_at, deleted_at, deleted, id, name,disk_format, container_format, size, virtual_size, status, is_public, checksum,min_disk, min_ram, owner, protected) VALUES (%s, %s, %s, %s, %s, %s, %s, %s,%s, %s, %s, %s, %s, %s, %s, %s, %s)‘ (datetime.datetime(2014, 8, 10, 18, 20,43, 882348), datetime.datetime(2014, 8, 10, 18, 20, 43, 882394), None, 0,‘6f626917-8c5d-4cea-9f49-591a97571b4d‘, ‘cirros-0.3.2-x86_64‘, ‘qcow2‘, ‘bare‘,13167616, None, ‘queued‘, 1, None, 0, 0, ‘cc7c2b5f178b4b9e94446a1862a477d9‘, 0)

2014-08-11 02:20:43.909 6607 INFO glance.wsgi.server[10ac2489-a38f-4c72-86b6-078d1f176c8f b37e9ece1df2487bbd74e8618be2d34acc7c2b5f178b4b9e94446a1862a477d9 - - -] 127.0.0.1 - - [11/Aug/2014 02:20:43]"POST /images HTTP/1.1" 500 139 0.931555

 

When u check db glancethere is only one table there

[root@node1images]# mysql -u root -popsware glance -e "show tables"

+------------------+

|Tables_in_glance |

+------------------+

| migrate_version |

+------------------+

This is abug and the work around is

https://bugzilla.redhat.com/show_bug.cgi?id=1090648


/etc/glance/glance-api.conf
--change:
db_enforce_mysql_charset=False