model_query does not support boolean read_deleted values

Bug #942690 reported by Jason Kölker on 2012-02-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Johannes Erdfelt

Bug Description

Unrecognized read_deleted value 'True'
  File "/usr/lib/python2.6/dist-packages/nova/compute/", line 174, in decorated_function
    return function(self, context, instance_uuid, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/nova/compute/", 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/", 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/", line 119, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/nova/db/sqlalchemy/", line 1446, in instance_get_by_uuid
    result = _build_instance_get(context, session=session).\
  File "/usr/lib/python2.6/dist-packages/nova/db/sqlalchemy/", line 119, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/nova/db/sqlalchemy/", line 1473, in _build_instance_get
  File "/usr/lib/python2.6/dist-packages/nova/db/sqlalchemy/", 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
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
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)

Fix proposed to branch: master

Changed in nova:
status: Confirmed → In Progress

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) on 2012-03-20
Changed in nova:
milestone: none → essex-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers