[DB2] Glance image-list command failed when there are more than DEFAULT_PAGE_SIZE images

Bug #1245947 reported by Feilong Wang
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Feilong Wang
Havana
Fix Released
Medium
Dong Liu

Bug Description

Glance image-list command will fail when there are more than DEFAULT_PAGE_SIZE images and user will run into below error with cli.

ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-30c23185-8a84-4321-8fd0-155b25904405)

It only happens on db2 backend after applying the patch https://review.openstack.org/#/c/35178/

Feilong Wang (flwang)
Changed in glance:
assignee: nobody → Fei Long Wang (flwang)
tags: added: db2
description: updated
Changed in glance:
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/54376

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/54376
Committed: http://github.com/openstack/glance/commit/3f533a28fa79e5ad7d2703123565f34839cd9ff3
Submitter: Jenkins
Branch: master

commit 3f533a28fa79e5ad7d2703123565f34839cd9ff3
Author: Fei Long Wang <email address hidden>
Date: Wed Oct 30 00:41:29 2013 +0800

    Glance image-list failed when image number exceed DEFAULT_PAGE_SIZE

    The root cause of the problem is that DB2 does not allow
    an empty string ('') for datetime field. So we set the
    default value of datetime as None.

    Fixes bug 1245947

    Change-Id: Ie372efe70a068024298fbde4574e33e565cc6c9a

Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
Benoît Knecht (benoit-knecht) wrote :
Download full text (5.5 KiB)

Actually, the same thing happens with PostgreSQL:

2014-01-08 14:11:25 CET ERROR: invalid input syntax for type timestamp: "" at character 4367
2014-01-08 14:11:25 CET STATEMENT: SELECT anon_1.anon_2_images_created_at AS anon_1_anon_2_images_created_at, anon_1.anon_2_images_updated_at AS anon_1_anon_2_images_updated_at, anon_1.anon_2_images_deleted_at AS anon_1_anon_2_images_deleted_at, anon_1.anon_2_images_deleted AS anon_1_anon_2_images_deleted, anon_1.anon_2_images_id AS anon_1_anon_2_images_id, anon_1.anon_2_images_name AS anon_1_anon_2_images_name, anon_1.anon_2_images_disk_format AS anon_1_anon_2_images_disk_format, anon_1.anon_2_images_container_format AS anon_1_anon_2_images_container_format, anon_1.anon_2_images_size AS anon_1_anon_2_images_size, anon_1.anon_2_images_status AS anon_1_anon_2_images_status, anon_1.anon_2_images_is_public AS anon_1_anon_2_images_is_public, anon_1.anon_2_images_checksum AS anon_1_anon_2_images_checksum, anon_1.anon_2_images_min_disk AS anon_1_anon_2_images_min_disk, anon_1.anon_2_images_min_ram AS anon_1_anon_2_images_min_ram, anon_1.anon_2_images_owner AS anon_1_anon_2_images_owner, anon_1.anon_2_images_protected AS anon_1_anon_2_images_protected, image_locations_1.created_at AS image_locations_1_created_at, image_locations_1.updated_at AS image_locations_1_updated_at, image_locations_1.deleted_at AS image_locations_1_deleted_at, image_locations_1.deleted AS image_locations_1_deleted, image_locations_1.id AS image_locations_1_id, image_locations_1.image_id AS image_locations_1_image_id, image_locations_1.value AS image_locations_1_value, image_locations_1.meta_data AS image_locations_1_meta_data, image_properties_1.created_at AS image_properties_1_created_at, image_properties_1.updated_at AS image_properties_1_updated_at, image_properties_1.deleted_at AS image_properties_1_deleted_at, image_properties_1.deleted AS image_properties_1_deleted, image_properties_1.id AS image_properties_1_id, image_properties_1.image_id AS image_properties_1_image_id, image_properties_1.name AS image_properties_1_name, image_properties_1.value AS image_properties_1_value
        FROM (SELECT anon_2.images_created_at AS anon_2_images_created_at, anon_2.images_updated_at AS anon_2_images_updated_at, anon_2.images_deleted_at AS anon_2_images_deleted_at, anon_2.images_deleted AS anon_2_images_deleted, anon_2.images_id AS anon_2_images_id, anon_2.images_name AS anon_2_images_name, anon_2.images_disk_format AS anon_2_images_disk_format, anon_2.images_container_format AS anon_2_images_container_format, anon_2.images_size AS anon_2_images_size, anon_2.images_status AS anon_2_images_status, anon_2.images_is_public AS anon_2_images_is_public, anon_2.images_checksum AS anon_2_images_checksum, anon_2.images_min_disk AS anon_2_images_min_disk, anon_2.images_min_ram AS anon_2_images_min_ram, anon_2.images_owner AS anon_2_images_owner, anon_2.images_protected AS anon_2_images_protected
        FROM (SELECT images.created_at AS images_created_at, images.updated_at AS images_updated_at, images.deleted_at AS images_deleted_at, images.deleted AS images_deleted, images.id AS images_id, images.name AS images_name, images.disk_format AS images...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/67025

Thierry Carrez (ttx)
Changed in glance:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Revision history for this message
Stephen Gran (sgran) wrote :

Can this be considered for a havana backport, please? We've just run across this on a fresh havana install with a postgres database.

Thanks,

Revision history for this message
gustavo panizzo (gfa) wrote :

please backport this to havana, we run postgres

gustavo panizzo (gfa)
tags: added: postgres
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/havana)

Reviewed: https://review.openstack.org/67025
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=33d1840d6a9c1d0b10b94576c7f3f25ffae51bd1
Submitter: Jenkins
Branch: stable/havana

commit 33d1840d6a9c1d0b10b94576c7f3f25ffae51bd1
Author: Fei Long Wang <email address hidden>
Date: Wed Oct 30 00:41:29 2013 +0800

    Glance image-list failed when image number exceed DEFAULT_PAGE_SIZE

    The root cause of the problem is that DB2 does not allow
    an empty string ('') for datetime field. So we set the
    default value of datetime as None.

    Fixes bug 1245947

    Change-Id: Ie372efe70a068024298fbde4574e33e565cc6c9a
    (cherry picked from commit 3f533a28fa79e5ad7d2703123565f34839cd9ff3)

tags: added: in-stable-havana
Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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