nova-cells crash with: operator does not exist: boolean = integer

Bug #1168490 reported by Patrick Hetu
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
David Ripton

Bug Description

I'm using PostgreSQL as database engine and nova-cells version 2013.1-0ubuntu1

2013-04-12 13:15:51.582 CRITICAL nova [req-4306ce80-d32a-4b2d-a57c-69e0f82a58d1 None None] (ProgrammingError) operator does not exist: boolean = integer
LINE 3: WHERE cells.deleted = 0
                            ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
 'SELECT cells.created_at AS cells_created_at, cells.updated_at AS cells_updated_at, cells.deleted_at AS cells_deleted_at, cells.deleted AS cells_deleted, cells.id AS cells_id, cells.name AS cells_name, cells.api_url AS cells_api_url, cells.username AS cells_username, cells.password AS cells_password, cells.weight_offset AS cells_weight_offset, cells.weight_scale AS cells_weight_scale, cells.is_parent AS cells_is_parent, cells.rpc_host AS cells_rpc_host, cells.rpc_port AS cells_rpc_port, cells.rpc_virtual_host AS cells_rpc_virtual_host \nFROM cells \nWHERE cells.deleted = %(deleted_1)s' {'deleted_1': 0}

Tags: db postgresql
Revision history for this message
Maciej Gałkiewicz (maciej-galkiewicz) wrote :
Download full text (7.7 KiB)

I am experiencing the same problem with nova-scheduler:

2013-04-19 11:21:52.066 20712 AUDIT nova.service [-] Starting scheduler node (version 2013.1)
2013-04-19 11:21:52.067 DEBUG nova.openstack.common.lockutils [req-45974975-94b8-4ccd-9a54-0184d869a096 None None] Got semaphore "dbapi_backend" for method "__get_backe
nd"... inner /usr/lib/python2.7/dist-packages/nova/openstack/common/lockutils.py:186
2013-04-19 11:21:52.232 20712 CRITICAL nova [-] (ProgrammingError) operator does not exist: boolean = integer
LINE 3: WHERE services.deleted = 0 AND services.host = 'cc' AND serv...
                               ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
 'SELECT services.created_at AS services_created_at, services.updated_at AS services_updated_at, services.deleted_at AS services_deleted_at, services.deleted AS service
s_deleted, services.id AS services_id, services.host AS services_host, services."binary" AS services_binary, services.topic AS services_topic, services.report_count AS
services_report_count, services.disabled AS services_disabled \nFROM services \nWHERE services.deleted = %(deleted_1)s AND services.host = %(host_1)s AND services."bina
ry" = %(binary_1)s \n LIMIT %(param_1)s' {'host_1': 'cc', 'param_1': 1, 'deleted_1': 0, 'binary_1': 'nova-scheduler'}
2013-04-19 11:21:52.232 20712 TRACE nova Traceback (most recent call last):
2013-04-19 11:21:52.232 20712 TRACE nova File "/usr/bin/nova-scheduler", line 56, in <module>
2013-04-19 11:21:52.232 20712 TRACE nova service.wait()
2013-04-19 11:21:52.232 20712 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 689, in wait
2013-04-19 11:21:52.232 20712 TRACE nova _launcher.wait()
2013-04-19 11:21:52.232 20712 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 209, in wait
2013-04-19 11:21:52.232 20712 TRACE nova super(ServiceLauncher, self).wait()
2013-04-19 11:21:52.232 20712 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 179, in wait
2013-04-19 11:21:52.232 20712 TRACE nova service.wait()
2013-04-19 11:21:52.232 20712 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 168, in wait
2013-04-19 11:21:52.232 20712 TRACE nova return self._exit_event.wait()
2013-04-19 11:21:52.232 20712 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
2013-04-19 11:21:52.232 20712 TRACE nova return hubs.get_hub().switch()
2013-04-19 11:21:52.232 20712 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 187, in switch
2013-04-19 11:21:52.232 20712 TRACE nova return self.greenlet.switch()
2013-04-19 11:21:52.232 20712 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 194, in main
2013-04-19 11:21:52.232 20712 TRACE nova result = function(*args, **kwargs)
2013-04-19 11:21:52.232 20712 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 147, in run_server
2013-04-19 11:21:52.232 20712 TRACE nova server.start()
2013-04-19 11:21:52.232 20712 TRACE nova File "/usr/lib/python2.7/dis...

Read more...

Chuck Short (zulcss)
tags: added: postgresql
Changed in nova:
status: New → Confirmed
importance: Undecided → High
tags: added: db
David Ripton (dripton)
Changed in nova:
assignee: nobody → David Ripton (dripton)
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/28567

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/28567
Committed: http://github.com/openstack/nova/commit/3728018924baf9cdf1d5c80980516bff3f50a430
Submitter: Jenkins
Branch: master

commit 3728018924baf9cdf1d5c80980516bff3f50a430
Author: David Ripton <email address hidden>
Date: Wed May 8 11:36:05 2013 -0400

    Change type of cells.deleted from boolean to integer.

    Fixes bug #1168490

    Migration 152 changed other tables' deleted column from boolean
    to integer, but cells got missed. SQLite and MySQL are weakly-
    typed enough that mixing integers and booleans is allowed, but
    PostgreSQL is not, and this causes an error.

    Migration 179 is a copy of migration 152, except applied only to
    the cells table.

    Change-Id: I85c39765edc206d38d21827ab54e1371155b9557

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