Confusion between UUID instance ID and integer ID in instance_info_cache_delete_by_instance_id
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Compute (nova) |
High
|
Alex Meade |
Bug Description
I can't delete an instance when using postgresql, because the code is passing an integer instance id where a UUID is expected to instance_
2011-12-12 01:56:01,892 DEBUG nova.api [092ca398-
2011-12-12 01:56:01,892 DEBUG nova.api.ec2.cloud [092ca398-
2011-12-12 01:56:01,957 DEBUG nova.compute.api [092ca398-
2011-12-12 01:56:01,964 ERROR nova.api [092ca398-
LINE 3: WHERE instance_
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
(nova.api): TRACE: Traceback (most recent call last):
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: result = api_request.
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: result = method(context, **args)
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: self.compute_
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: return f(*args, **kwargs)
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: self._delete(
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: self.db.
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: return IMPL.instance_
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: return f(*args, **kwargs)
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: session=session)
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: return f(*args, **kwargs)
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: instance_
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: return f(*args, **kwargs)
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: session=session)
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: instance_
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: return f(*args, **kwargs)
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: session=session)
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: return f(*args, **kwargs)
(nova.api): TRACE: File "/usr/lib/
(nova.api): TRACE: filter_
(nova.api): TRACE: File "build/
(nova.api): TRACE: ret = list(self[0:1])
(nova.api): TRACE: File "build/
(nova.api): TRACE: return list(res)
(nova.api): TRACE: File "build/
(nova.api): TRACE: return self._execute_
(nova.api): TRACE: File "build/
(nova.api): TRACE: result = conn.execute(
(nova.api): TRACE: File "build/
(nova.api): TRACE: params)
(nova.api): TRACE: File "build/
(nova.api): TRACE: compiled_sql, distilled_params
(nova.api): TRACE: File "build/
(nova.api): TRACE: context)
(nova.api): TRACE: File "build/
(nova.api): TRACE: context)
(nova.api): TRACE: File "build/
(nova.api): TRACE: cursor.
(nova.api): TRACE: ProgrammingError: (ProgrammingError) operator does not exist: character varying = integer
(nova.api): TRACE: LINE 3: WHERE instance_
(nova.api): TRACE: ^
(nova.api): TRACE: HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
(nova.api): TRACE: 'SELECT instance_
Changed in nova: | |
importance: | Undecided → High |
status: | New → Confirmed |
Alex Meade (alex-meade) wrote : | #1 |
Changed in nova: | |
assignee: | nobody → Alex Meade (alex-meade) |
status: | Confirmed → In Progress |
Fix proposed to branch: master
Review: https:/
Reviewed: https:/
Committed: http://
Submitter: Jenkins
Branch: master
commit 26b7b9457a5899e
Author: Alex Meade <email address hidden>
Date: Wed Jan 11 19:43:26 2012 +0000
Call to instance_
Fixes bug 903497
Also updated incorrect calls to instance_destroy that were using uuids.
Change-Id: I25eead020ceb7e
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
milestone: | none → essex-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | essex-3 → 2012.1 |
This is true! It's as simple as instance_destroy passes instance id instead of instance uuid into instance_ info_cache_ delete in nova/db/ sqlalchemy/ api.py.