If a network exists in the quantum database but not in NVP we should allow someone to create a port on this network though set the status to error. The reason for allowing this is if one deletes a network from NVP and the dhcp agent goes to create it's dhcp port on this network currently an error will be raised to the agent and it will enter a constant cycle of resyncing.
Traceback (most recent call last):
File "/opt/stack/quantum/quantum/plugins/nicira/QuantumPlugin.py", line 1190, in create_port
port_create_func(context, port_data)
File "/opt/stack/quantum/quantum/plugins/nicira/QuantumPlugin.py", line 374, in _nvp_create_port
port_data)
File "/opt/stack/quantum/quantum/plugins/nicira/QuantumPlugin.py", line 340, in _nvp_find_lswitch_for_port
allow_extra_lswitches)
File "/opt/stack/quantum/quantum/plugins/nicira/QuantumPlugin.py", line 738, in _handle_lswitch_selection
lswitches = nvplib.get_lswitches(cluster, network.id)
File "/opt/stack/quantum/quantum/plugins/nicira/nvplib.py", line 262, in get_lswitches
cluster=cluster)
File "/opt/stack/quantum/quantum/plugins/nicira/nvplib.py", line 208, in do_single_request
raise exception.NotFound()
NotFound: An unknown exception occurred.
2013-05-12 17:02:20 ERROR [quantum.api.v2.resource] create failed
Traceback (most recent call last):
File "/opt/stack/quantum/quantum/api/v2/resource.py", line 82, in resource
result = method(request=request, **args)
File "/opt/stack/quantum/quantum/api/v2/base.py", line 381, in create
obj = obj_creator(request.context, **kwargs)
File "/opt/stack/quantum/quantum/plugins/nicira/QuantumPlugin.py", line 1197, in create_port
raise e
NotFound: An unknown exception occurred.
Fix proposed to branch: master /review. openstack. org/28915
Review: https:/