Handle race: server may send port bind msg before wfagent/port is bound.
This is caused by a multithreaded separation of concerns. The generic agent main thread notices when ports are plugged on OVS switches, and notifies the neutron server of the dpid/ofport for the newly-plugged port_id. But, when the agent creates and plugs a port for a new wfagent, it wasn't sending its wfagent/port binding msg (which tells neutron that a given wfagent has been bound to a port on some client node) until after the wfapp was running. The main thread saw the new port plug and sent and received generic port binding info that did not have the wfagent part of the binding because it hadn't been made yet. So now we just send a wfagent bind notification prior to plugging the device for the new port; and then later on send another wfagent bind notification to update status once the wfapp is running.
Showing with 27 additions and 0 deletions