Fix AttributeError on port_bound for missing ports
If the port is concurrently deleted, db_get_val returns None, and
that causes the Exception to be raised. However, the exception is just
log noise if the port has been deleted concurrently and it does not
lead to failures.
This can happen if port_update and port_delete operations occur
in short sequence and interleave. To prevent this trace from
occurring, this patch checks that the port is being eliminated and
emits an error trace only if the port is indeed to be expected
amongst the list of ports to be updated.
We do not raise an exception to avoid disrupting the agent sync
process, and leave to the admin the investigation of the issue
(should that be cronic rather than transient).
Under normal circumstances, if the port is expected it should
be there, and if it isn't this should be treated as a bug to be
investigated further.
Closes-bug: #
1455320
Change-Id: Ic609af0ef6a09b536c882c58c23167c0a469b155