[openstack-dev] [nova] [bug] "nova server-group-list" doesn't show any members
Chris Friesen
chris.friesen at windriver.com
Mon Mar 31 23:02:47 UTC 2014
On 03/31/2014 03:56 PM, Vishvananda Ishaya wrote:
>
> On Mar 27, 2014, at 4:38 PM, Chris Friesen <chris.friesen at windriver.com> wrote:
>
>> On 03/27/2014 04:47 PM, Chris Friesen wrote:
>>
>>> Interestingly, unit test
>>> nova.tests.api.openstack.compute.contrib.test_server_groups.ServerGroupTest.test_display_members
>>> passes just fine, and it seems to be running the same sqlalchemy code.
>>>
>>> Is this a case where sqlite behaves differently from mysql?
>>
>> Sorry to keep replying to myself, but this might actually hit us other places.
>>
>> Down in db/sqlalchemy/api.py we end up calling
>>
>>
>> query = query.filter(column_attr.op(db_regexp_op)('None’))
>
> Sqlalchemy handles mapping None to NULL in many cases, so it appears that the problem is that we are passing
> None as a string here?
I think fundamentally it makes no sense to try and regex match a NULL
database field. So in instance_get_all_by_filters() if we want to test
for None it should be done separate from the regex filter.
Chris
More information about the OpenStack-dev
mailing list