The sqlalchemy method volume_get_active_by_window() always returns none

Bug #1131320 reported by Ollie Leahy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Ollie Leahy

Bug Description

The method volume_get_active_by_window() in cinder/db/sqlalchemy/api.py always returns an empty list of volumes, because the expression 'models.Volume.deleted_at is None' will always return false.

What was intended was models.Volume.deleted_at == None
Volumes_deleted_at is not None, it's an attribute that can return None.

I also think that there should be a further filter here, volumes that are in an error or creating state should not be included, for the same reason that deleted volumes should not be included: they can't be billed.

Changed in python-cinderclient:
assignee: nobody → Ollie Leahy (oliver-leahy-l)
affects: python-cinderclient → cinder
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

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

Reviewed: https://review.openstack.org/23104
Committed: http://github.com/openstack/cinder/commit/1b330677b283ce7b5f3fa57efe3a26b00ff38be1
Submitter: Jenkins
Branch: master

commit 1b330677b283ce7b5f3fa57efe3a26b00ff38be1
Author: Ollie Leahy <email address hidden>
Date: Wed Feb 27 18:30:38 2013 +0000

    Fix query filter in volume_get_active_by_window()

    Fixes LP bug #1131320

    Change-Id: Iec51ecbe49a76e3a5b7374b04f20949c77c52984

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: grizzly-rc1 → 2013.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.