model_query does not support boolean read_deleted values

Bug #942690 reported by Jason Kölker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Johannes Erdfelt

Bug Description

Unrecognized read_deleted value 'True'
  File "/usr/lib/python2.6/dist-packages/nova/compute/manager.py", line 174, in decorated_function
    return function(self, context, instance_uuid, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/nova/compute/manager.py", line 1557, in get_lock
    instance_ref = self.db.instance_get_by_uuid(context, instance_uuid)
  File "/usr/lib/python2.6/dist-packages/nova/db/api.py", line 586, in instance_get_by_uuid
    return IMPL.instance_get_by_uuid(context, uuid)
  File "/usr/lib/python2.6/dist-packages/nova/db/sqlalchemy/api.py", line 119, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/nova/db/sqlalchemy/api.py", line 1446, in instance_get_by_uuid
    result = _build_instance_get(context, session=session).\
  File "/usr/lib/python2.6/dist-packages/nova/db/sqlalchemy/api.py", line 119, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/nova/db/sqlalchemy/api.py", line 1473, in _build_instance_get
    project_only=True).\
  File "/usr/lib/python2.6/dist-packages/nova/db/sqlalchemy/api.py", line 188, in model_query
    _("Unrecognized read_deleted value '%s'") % read_deleted)

Changed in nova:
assignee: nobody → Jason Kölker (jason-koelker)
status: New → In Progress
Revision history for this message
Jason Kölker (jason-koelker) wrote :

read_deleted should only be strings, but something is setting it as a boolean. Do we want to support booleans?

Changed in nova:
assignee: Jason Kölker (jason-koelker) → nobody
status: In Progress → Confirmed
Revision history for this message
Rick Harris (rconradharris) wrote :

I'd vote against allowing booleans here since `read_deleted` is tri-valued. It would end up being even more confusing than it already is! :)

Changed in nova:
assignee: nobody → Johannes Erdfelt (johannes.erdfelt)
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/4726

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

Reviewed: https://review.openstack.org/4726
Committed: http://github.com/openstack/nova/commit/ff95c90f51d1d1e70a247cb7e94bb7cb757ac37d
Submitter: Jenkins
Branch: master

commit ff95c90f51d1d1e70a247cb7e94bb7cb757ac37d
Author: Johannes Erdfelt <email address hidden>
Date: Wed Feb 29 21:52:01 2012 +0000

    Ensure that context read_deleted is only one of 'no', 'yes' or 'only'

    Fixes bug 942690

    Change-Id: I1b1867062a8af7b3fb0eb575e6b9570a964cfefa

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