summaryrefslogtreecommitdiffstats
path: root/nova/db
diff options
context:
space:
mode:
authorDan Smith <danms@us.ibm.com>2012-10-26 14:32:10 -0700
committerDan Smith <danms@us.ibm.com>2012-10-26 14:32:10 -0700
commit91fb1ce5c8b8c11fb6e35d8774b7df48da0786b3 (patch)
tree45ae43b938fbce11af1eb3fb0a50fbf4f4a598a3 /nova/db
parent47e81951f7925ef506cd1ef8ba9262c127357d0c (diff)
Fix nova-network MAC collision logic
The exception being caught and transformed in sqlalchemy/api.py was incorrect, causing nova-network to miss it in the MAC collision retry loop. This patch corrects that and adds a test of the collision logic. Fixes bug 1059366 Change-Id: I6bf16c2f59f06c7e84441604b057afd8dfe6d709
Diffstat (limited to 'nova/db')
-rw-r--r--nova/db/sqlalchemy/api.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index 6dd57fc2f..c2ae1dc70 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -1271,7 +1271,7 @@ def virtual_interface_create(context, values):
vif_ref = models.VirtualInterface()
vif_ref.update(values)
vif_ref.save()
- except IntegrityError:
+ except exception.DBError:
raise exception.VirtualInterfaceCreateException()
return vif_ref