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.
Reviewed: https:/ /review. openstack. org/174818 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=a80924dc3e6 489848738333993 50ba4817f1eaa9
Committed: https:/
Submitter: Jenkins
Branch: master
commit a80924dc3e64898 4873833399350ba 4817f1eaa9
Author: Kevin Benton <email address hidden>
Date: Fri Apr 17 04:09:48 2015 -0700
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: Ic55496dd2ba3ab cef0a2de9fc8699 c391b79fa51
Partial-Bug: #1445412