yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #43032
[Bug 1481154] Re: Glace return HTTPInternalServerError when use postgresql
Reviewed: https://review.openstack.org/208851
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=d13f088cac92988f3360363d9d34b60b518d18e9
Submitter: Jenkins
Branch: master
commit d13f088cac92988f3360363d9d34b60b518d18e9
Author: wangxiyuan <wangxiyuan@xxxxxxxxxx>
Date: Tue Aug 4 14:35:46 2015 +0800
Fix default value with postgreSQL
When use 'sort-key=size' for multi-pages searching with postgreSQL
DB, it will raise an error: DBError: (psycopg2.DataError). And return
HTTPInternalServerError (HTTP 500) to users. The reason is that
postgreSQL doesn't support the size's default value to be string.
This patch set the size's default value to zero.
Change-Id: Ib3b5f3f57be3683ba274f0122e6314978a79e75f
Closes-bug:#1481154
** Changed in: glance
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1481154
Title:
Glace return HTTPInternalServerError when use postgresql
Status in Glance:
Fix Released
Bug description:
version: master, db: postgreSQL
reproduce:
1.create one or more images without data, like:
glance image-create --name xxx or glance image-create
then we will get image information though 'glance image-list', like:
+--------------------------------------+--------------------------+-------------+------------------+---------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+--------------------------+-------------+------------------+---------+--------+
| 67b47035-3e70-4dd0-a5a7-3fc3350a26ee | cirros-0.3.0-x86_64-disk | qcow2 | bare | 9761280 | active |
| bf8022ef-3e3a-4bef-8d13-ccea9000828f | test | | | | queued |
| 0180e9f2-6506-46c7-be07-e67ee6d5dab8 | test2 | | | | queued |
| 505bbc97-f470-44b7-bb59-315a5d92d8e0 | test3 | | | | queued |
| 03ef4387-f276-40dc-9aa6-ad811eb3c466 | test5 | | | | queued |
| 5af5d95d-8c2f-4bec-9fdd-74ce9ce3a4ca | | | | | queued |
+--------------------------------------+--------------------------+-------------+------------------+---------+--------+
2.list image like : glance image-list --sort-key=size --page-size=3
(sort-key must be 'size', and page-size must be less than or equal to
image amount )
then, glance will return an error:
HTTPInternalServerError (HTTP 500)
P.S.:When use mysql db, I didn't encounter this problem.
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1481154/+subscriptions
References