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
This commit is contained in:
Kevin Benton 2017-03-15 15:06:01 -07:00
parent 1414ea9538
commit bb3653f337
1 changed files with 2 additions and 0 deletions

View File

@ -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."""