Glance v1 and v2 api returns 500 while passing --min-ram and --min-disk greater than 2^(31) max value

Bug #1460060 reported by Pranali Deore
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Inessa Vasilevskaya
Glance Client
Won't Fix
Undecided
Unassigned

Bug Description

glance image-create --name test --container-format bare --disk-format raw --file delete_images.py --min-disk 100000000000000
HTTPInternalServerError (HTTP 500)

glance image-create --name test --container-format bare --disk-format raw --file delete_images.py --min-ram 100000000000000
HTTPInternalServerError (HTTP 500)

Changed in glance:
assignee: nobody → Pranali Deore (pranali-deore)
Revision history for this message
Erno Kuvaja (jokke) wrote :

On our fail early principle we should not send these values to the server at the first place. This does not mean that we shouldn't fix the server side as well.

Revision history for this message
Ian Cordasco (icordasc) wrote :
Changed in glance:
status: New → In Progress
importance: Undecided → Medium
assignee: Pranali Deore (pranali-deore) → Inessa Vasilevskaya (ivasilevskaya)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/182703
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=1badf69b01ed6d6f15898f33d20e4e1ed92d1deb
Submitter: Jenkins
Branch: master

commit 1badf69b01ed6d6f15898f33d20e4e1ed92d1deb
Author: Inessa Vasilevskaya <email address hidden>
Date: Wed May 13 17:44:47 2015 +0300

    Fix DbError when image params are out of range

    Image params such as checksum, min_ram and min_disk are validated.
    Checksum is expected to be not longer than 32 characters,
    min_ram/min_disk can't exceed pow(2, 31) - 1.
    A method for mysql_int validation has been moved to glance.common.utils.

    Change-Id: I78554ef1ba65fc11da3de56467d6d70bb7991787
    Closes-Bug: #1454730
    Closes-Bug: #1460060

Changed in glance:
status: In Progress → Fix Committed
Changed in glance:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Changed in python-glanceclient:
assignee: nobody → Cindy Pallares (cpallares)
Revision history for this message
Pranali Deore (pranali-deore) wrote :

Hi Ian,

I have created new bug #1468698 for image-update, becuase this bug is marked as Fix Released and I was not sure wheter we can reopen this bug.
Please let me know your opinion.

Thierry Carrez (ttx)
Changed in glance:
milestone: liberty-1 → 11.0.0
Changed in python-glanceclient:
assignee: Cindy Pallares (cpallares) → nobody
Revision history for this message
Ian Cordasco (icordasc) wrote :

This was fixed on the server-side and requires no additional work on the client side.

Changed in python-glanceclient:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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