ovs agent resync may miss port remove event
In OVS Agent rpc_loop() resync mechanism clears the registered ports and
rescans them again, and it might result in missing some "port removed"
event and treat_devices_removed will not be called.
This fix rescans the newly updated ports when resync mechanism called,
without clearing the current registered ports.
The registered ports will be cleared only if there are too many
consecutive resyncs to avoid resycing forever because of the same
faulty port.
Closes-Bug: #
1329223
Co-Authored-By: Andrey Epifanov <aepifanov@mirantis.com>
Co-Authored-By: Gandharva S <gandharva.s@hp.com>
Co-Authored-By: Romil Gupta <romilg@hp.com>
Co-Authored-By: Rossella Sblendido <rsblendido@gmail.com>
Change-Id: Ib0db9dcf889d9fd90b623857782c9a6b091e18f5