From 91fb1ce5c8b8c11fb6e35d8774b7df48da0786b3 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Fri, 26 Oct 2012 14:32:10 -0700 Subject: 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 --- nova/db/sqlalchemy/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/db') 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 -- cgit