From bb3653f337b5f9df0a810a4cc2b078ce8c5f02fb Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Wed, 15 Mar 2017 15:06:01 -0700 Subject: [PATCH] Don't IPAddressGenerationFailure for DHCP ports This is a runtime state users can easily create by creating tiny subnets with no room for DHCP agent addresses. It's not something we need to dump tracebacks on the server for because it's not a bug or unexpected outcome. These traces can be seen all over the API test logs where small subnets are created without the need to actuall put things on them. TrivialFix Change-Id: I663b0df07608d8511a40c82e589875c50c7a6066 --- neutron/api/rpc/handlers/dhcp_rpc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/neutron/api/rpc/handlers/dhcp_rpc.py b/neutron/api/rpc/handlers/dhcp_rpc.py index 70defc6293f..e24f1ad635f 100644 --- a/neutron/api/rpc/handlers/dhcp_rpc.py +++ b/neutron/api/rpc/handlers/dhcp_rpc.py @@ -234,6 +234,7 @@ class DhcpRpcCallback(object): plugin = directory.get_plugin() plugin.delete_ports_by_device_id(context, device_id, network_id) + @oslo_messaging.expected_exceptions(exceptions.IpAddressGenerationFailure) @db_api.retry_db_errors @resource_registry.mark_resources_dirty def create_dhcp_port(self, context, **kwargs): @@ -258,6 +259,7 @@ class DhcpRpcCallback(object): plugin = directory.get_plugin() return self._port_action(plugin, context, port, 'create_port') + @oslo_messaging.expected_exceptions(exceptions.IpAddressGenerationFailure) @db_api.retry_db_errors def update_dhcp_port(self, context, **kwargs): """Update the dhcp port."""