Deleting instances using postgres db fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Ken Pepple |
Bug Description
If I try delete instances while using a postgres db I get the following errors:
==> /var/log/
2011-04-28 17:46:37,688 DEBUG nova.rpc [-] received {u'_context_
2011-04-28 17:46:37,688 DEBUG nova.rpc [-] unpacked context: {'timestamp': u'2011-
2011-04-28 17:46:37,689 INFO nova.compute.
2011-04-28 17:46:37,689 INFO nova.compute.
2011-04-28 17:46:37,689 DEBUG nova.compute.
2011-04-28 17:46:37,756 INFO nova.compute.
2011-04-28 17:46:37,756 INFO nova.compute.
2011-04-28 17:46:37,757 INFO nova.compute.
2011-04-28 17:46:37,820 AUDIT nova.compute.
2011-04-28 17:46:37,827 DEBUG nova.compute.
2011-04-28 17:46:37,854 DEBUG nova.virt.
2011-04-28 17:46:37,920 INFO nova.virt.
2011-04-28 17:46:37,927 INFO nova.virt.
2011-04-28 17:46:37,937 ERROR nova.exception [-] Uncaught exception
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: return f(*args, **kw)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: function(self, context, instance_id, *args, **kwargs)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: self.db.
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: return IMPL.instance_
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: return f(*args, **kwargs)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: 'updated_at': literal_
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: result = session.
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: clause, params or {})
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: params)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: return self.__
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: context.
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: context)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: context)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: cursor.
(nova.exception): TRACE: ProgrammingError: (ProgrammingError) column "deleted" is of type boolean but expression is of type integer
(nova.exception): TRACE: LINE 1: ... deleted_
(nova.exception): TRACE: ^
(nova.exception): TRACE: HINT: You will need to rewrite or cast the expression.
(nova.exception): TRACE: 'UPDATE instances SET updated_
(nova.exception): TRACE:
2011-04-28 17:46:37,938 ERROR nova [-] Exception during message handling
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/lib/
(nova): TRACE: rval = node_func(
(nova): TRACE: File "/usr/lib/
(nova): TRACE: raise Error(str(e))
(nova): TRACE: Error: (ProgrammingError) column "deleted" is of type boolean but expression is of type integer
(nova): TRACE: LINE 1: ... deleted_
(nova): TRACE: ^
(nova): TRACE: HINT: You will need to rewrite or cast the expression.
(nova): TRACE: 'UPDATE instances SET updated_
(nova): TRACE:
I tried changing the deleted column in the db to an integer field but that broke nova completely.
Related branches
- Todd Willey (community): Approve
- justinsb (community): Approve
-
Diff: 32 lines (+4/-4)1 file modifiednova/db/sqlalchemy/api.py (+4/-4)
Changed in nova: | |
assignee: | nobody → Ken Pepple (ken-pepple) |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
milestone: | none → diablo-1 |
Changed in nova: | |
milestone: | diablo-1 → 2011.3 |
status: | Fix Committed → Fix Released |
marc: i changed the db queries to use True/False for postgres compatibility (we've seen this before :) ) ... can you test it out ?