missing test for None in sqlalchemy query filter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Chris Friesen |
Bug Description
In db.sqlalchemy.
if not filters.
query_prefix = query_prefix.\
In sqlalchemy a comparison against a non-null value will not match null values, so the above filter will not return objects where vm_state is NULL.
The problem is that in the Instance object the "vm_state" field is declared as nullable. In many cases "vm_state" will in fact have a value, but in get_test_instance() in test/utils.py the value of "vm_state" is not specified.
Given the above, it seems that either we need to configure "models.
if not filters.
query_prefix = query_prefix.\
If we want to fix the query, I'll happily submit the updated code.
tags: | added: db |
Changed in nova: | |
assignee: | nobody → Chris Friesen (cbf123) |
Changed in nova: | |
milestone: | none → icehouse-rc1 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | icehouse-rc1 → 2014.1 |
Fix proposed to branch: master /review. openstack. org/82869
Review: https:/