Invalid UUID in servers rest calls causes 500s when using Postgresql
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Sean Dague |
Bug Description
When using the Postgresql database, invalid UUIDs cause 500s because the following check in nova/compute/
def get(self, context, instance_id):
"""Get a single instance with the given instance_id."""
# NOTE(ameade): we still need to support integer ids for ec2
if uuidutils.
else:
When an invalid, though string like, UUID is passed into this code (like a 35 or 37 alphabetic UUIDish string), we fail over to the integer version of this function. The net result id we pass a non-int value down to instance_get.
On MySQL, which is pretty type fluid, things are fine. On Postgresql, which is type strict, this generates a DataError because id='aaaaaa' is never executed, as it's a type error.
Changed in nova: | |
importance: | Undecided → High |
Changed in nova: | |
assignee: | nobody → Sean Dague (sdague-b) |
Changed in nova: | |
milestone: | none → grizzly-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | grizzly-3 → 2013.1 |
Fix proposed to branch: master /review. openstack. org/19846
Review: https:/