sqlalchemy impl of fixed_ip_count_by_project filters ips incorretly

Bug #1171161 reported by Dmitry Spikhalskiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dmitry Spikhalskiy

Bug Description

SqlAlchemy implementation of db api filters ips by projects incorrectly (models.Instance.uuid == project_id)

@require_context
def fixed_ip_count_by_project(context, project_id, session=None):
    nova.context.authorize_project_context(context, project_id)
    return model_query(context, models.FixedIp.id,
                       base_model=models.FixedIp, read_deleted="no",
                       session=session).\
                join((models.Instance,
                      models.Instance.uuid == models.FixedIp.instance_uuid)).\
                filter(models.Instance.uuid == project_id).\
                count()

Changed in nova:
status: New → In Progress
assignee: nobody → Dmitry Spikhalskiy (dmitry-x)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/27225
Committed: http://github.com/openstack/nova/commit/101b80e020646fd82ae089ab9dd053ebab1cf48e
Submitter: Jenkins
Branch: master

commit 101b80e020646fd82ae089ab9dd053ebab1cf48e
Author: Dmitry Spikhalskiy <email address hidden>
Date: Mon Apr 22 22:43:45 2013 +0200

    Fix fixed_ip_count_by_project in DB API

    Fix "by project" filtering in fixed_ip_count_by_project
    method of SQLAlchemy DB API implementation.

    Fixes: bug #1171161
    Change-Id: Id408aba6db4dd953945feba36d17b056266ca4b7

Changed in nova:
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.2
Sean Dague (sdague)
no longer affects: nova/grizzly
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.