Insufficient upper bounds checking performed on flavor-create API

Bug #1278939 reported by John Warren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
John Warren

Bug Description

The fix for bug #1243195 added upper-bound checking for flavor fields based on sys.maxint. The problem is that the value of maxint varies by platform (either 32- or 64-bit signed integers), while the INTEGER type in databases is limited to 32-bit signed integers. This means that the upper-bound checking does not work on platforms where sys.maxint returns the maximum value of a 64-bit signed integer. The original reported problems (as shown in http://paste.openstack.org/show/48988/) persist on 64-bit platforms.

Tags: api db
Changed in nova:
status: New → Confirmed
Revision history for this message
Matt Riedemann (mriedem) wrote :
Changed in nova:
status: Confirmed → In Progress
assignee: nobody → John Warren (jswarren)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/72704
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8d2d72559ce8b371532e2e87912bd7ef74ccb8b3
Submitter: Jenkins
Branch: master

commit 8d2d72559ce8b371532e2e87912bd7ef74ccb8b3
Author: John Warren <email address hidden>
Date: Tue Feb 11 17:06:07 2014 +0000

    Fix upper bound checking for flavor create parameters

    Fix flavor-create upper bound checking so it uses platform-independent
    32-bit max signed integer value instead of sys.maxint, which causes
    problems on 64-bit platforms. The DB int type is a 32-bit signed
    integer, regardless of platform.

    Change-Id: I82624121a45f6385d3ea9ae9c032109834584fac
    Closes-bug: 1278939

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.1
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.