I use PostgreSQL as database. The type of deleted field in instance_types table is boolean. It can't use integer to represent boolean value. May be it can be in Python, but not in sql query string when use PostgreSQL.
2011-03-14 14:58:11,296 CRITICAL nova [-] (ProgrammingError) operator does not exist: boolean = integer
LINE 3: WHERE instance_types.deleted = 0 ORDER BY name
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
'SELECT instance_types.created_at AS instance_types_created_at, instance_types.updated_at AS instance_types_updated_at, instance_types.deleted_at AS instance_types_deleted_at, instance_types.deleted AS instance_types_deleted, instance_types.id AS instance_types_id, instance_types.name AS instance_types_name, instance_types.memory_mb AS instance_types_memory_mb, instance_types.vcpus AS instance_types_vcpus, instance_types.local_gb AS instance_types_local_gb, instance_types.flavorid AS instance_types_flavorid, instance_types.swap AS instance_types_swap, instance_types.rxtx_quota AS instance_types_rxtx_quota, instance_types.rxtx_cap AS instance_types_rxtx_cap \nFROM instance_types \nWHERE instance_types.deleted = %(deleted_1)s ORDER BY name' {'deleted_1': 0}
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/nova-manage", line 989, in <module>
(nova): TRACE: main()
(nova): TRACE: File "/usr/bin/nova-manage", line 981, in main
(nova): TRACE: fn(*argv)
(nova): TRACE: File "/usr/bin/nova-manage", line 738, in list
(nova): TRACE: inst_types = instance_types.get_all_types()
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/compute/instance_types.py", line 95, in get_all_types
(nova): TRACE: return db.instance_type_get_all(context.get_admin_context(), inactive)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/db/api.py", line 1059, in instance_type_get_all
(nova): TRACE: return IMPL.instance_type_get_all(context, inactive)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 109, in wrapper
(nova): TRACE: return f(*args, **kwargs)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 2206, in instance_type_get_all
(nova): TRACE: order_by("name").\
(nova): TRACE: File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/query.py", line 1453, in all
(nova): TRACE: return list(self)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/query.py", line 1565, in __iter__
(nova): TRACE: return self._execute_and_instances(context)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/query.py", line 1570, in _execute_and_instances
(nova): TRACE: mapper=self._mapper_zero_or_none())
(nova): TRACE: File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/session.py", line 735, in execute
(nova): TRACE: clause, params or {})
(nova): TRACE: File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1157, in execute
(nova): TRACE: params)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1237, in _execute_clauseelement
(nova): TRACE: return self.__execute_context(context)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1268, in __execute_context
(nova): TRACE: context.parameters[0], context=context)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1367, in _cursor_execute
(nova): TRACE: context)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1360, in _cursor_execute
(nova): TRACE: context)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/default.py", line 288, in do_execute
(nova): TRACE: cursor.execute(statement, parameters)
(nova): TRACE: ProgrammingError: (ProgrammingError) operator does not exist: boolean = integer
(nova): TRACE: LINE 3: WHERE instance_types.deleted = 0 ORDER BY name
(nova): TRACE: ^
(nova): TRACE: HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
(nova): TRACE: 'SELECT instance_types.created_at AS instance_types_created_at, instance_types.updated_at AS instance_types_updated_at, instance_types.deleted_at AS instance_types_deleted_at, instance_types.deleted AS instance_types_deleted, instance_types.id AS instance_types_id, instance_types.name AS instance_types_name, instance_types.memory_mb AS instance_types_memory_mb, instance_types.vcpus AS instance_types_vcpus, instance_types.local_gb AS instance_types_local_gb, instance_types.flavorid AS instance_types_flavorid, instance_types.swap AS instance_types_swap, instance_types.rxtx_quota AS instance_types_rxtx_quota, instance_types.rxtx_cap AS instance_types_rxtx_cap \nFROM instance_types \nWHERE instance_types.deleted = %(deleted_1)s ORDER BY name' {'deleted_1': 0}
(nova): TRACE: