fixed_ip_disassociate_timeout_pgsql casting errors w/ Postgres

Bug #803716 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Prince

Bug Description

Using nova trunk bzr 1230 with Postgres.

I'm getting the following stack trace in nova-network.log:

2011-06-30 01:32:35,320 DEBUG nova.network.manager [4N9HZUFF8CZQ1-NYSQYN None None] Leasing IP 192.168.0.2 from (pid=15154) lease_fixed_ip /usr/lib/pymodules/python2.6/nova/network/manager.py:228
2011-06-30 01:32:41,882 ERROR nova [-] in looping call
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/utils.py", line 466, in _inner
(nova): TRACE: self.f(*self.args, **self.kw)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/service.py", line 266, in periodic_tasks
(nova): TRACE: self.manager.periodic_tasks(context.get_admin_context())
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/network/manager.py", line 156, in periodic_tasks
(nova): TRACE: time)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/db/api.py", line 365, in fixed_ip_disassociate_all_by_timeout
(nova): TRACE: return IMPL.fixed_ip_disassociate_all_by_timeout(context, host, time)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 97, in wrapper
(nova): TRACE: return f(*args, **kwargs)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 722, in fixed_ip_disassociate_all_by_timeout
(nova): TRACE: synchronize_session='fetch')
(nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 2156, in update
(nova): TRACE: params=self._params).fetchall()
(nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 735, in execute
(nova): TRACE: clause, params or {})
(nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1157, in execute
(nova): TRACE: params)
(nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1237, in _execute_clauseelement
(nova): TRACE: return self.__execute_context(context)
(nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1268, in __execute_context
(nova): TRACE: context.parameters[0], context=context)
(nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1367, in _cursor_execute
(nova): TRACE: context)
(nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1360, in _cursor_execute
(nova): TRACE: context)
(nova): TRACE: File "/usr/lib/python2.6/dist-packages/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 5: ...ixed_ips.instance_id IS NOT NULL AND fixed_ips.allocated = 0
(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 fixed_ips.id AS fixed_ips_id \nFROM fixed_ips \nWHERE fixed_ips.network_id IN (SELECT networks.id \nFROM networks \nWHERE networks.host = %(host_1)s) AND fixed_ips.updated_at < %(updated_at_1)s AND fixed_ips.instance_id IS NOT NULL AND fixed_ips.allocated = %(allocated_1)s' {'host_1': 'nova1', 'allocated_1': 0, 'updated_at_1': datetime.datetime(2011, 6, 30, 1, 22, 41, 856402)}
(nova): TRACE:

---

Need to fix the fixed_ip_disassociate_all_by_timeout in the DB api so that it supports Postgres (casting issues)

Related branches

Dan Prince (dan-prince)
Changed in nova:
status: New → In Progress
assignee: nobody → Dan Prince (dan-prince)
Dan Prince (dan-prince)
Changed in nova:
importance: Undecided → Medium
Dan Prince (dan-prince)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-3
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-3 → 2011.3
status: Fix Committed → Fix Released
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.