]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Don't update port with host id of None
authorKevin Benton <blak111@gmail.com>
Fri, 17 Apr 2015 11:09:48 +0000 (04:09 -0700)
committerKevin Benton <blak111@gmail.com>
Sat, 25 Apr 2015 17:17:07 +0000 (10:17 -0700)
commita80924dc3e648984873833399350ba4817f1eaa9
treee172133304a85dd4ee3fca16a1c4fbdd6fba6dba
parent5d427e225e7127dce66905d027728fda64e3fa03
Don't update port with host id of None

In the L3 RPC code if the host for a port is not
present, it ends up calling update_port with the
host_id set to None. This does not update the host
id at all because it's treated as an unset attribute
which leads to the same thing happening on the next
iteration. These pointless update calls are expensive
because they involve a semaphore and calls to mechanism
drivers.

This patch adjusts the logic to only send a port
update if it actually has a host to ensure is on
the port.

Change-Id: Ic55496dd2ba3abcef0a2de9fc8699c391b79fa51
Partial-Bug: #1445412
neutron/api/rpc/handlers/l3_rpc.py
neutron/tests/unit/extensions/test_l3.py