Skip to content

Commit

Permalink
ovn-controller: Remove old values from local_ids.
Browse files Browse the repository at this point in the history
local_ids is supposed to be the set of interface iface-id values from
this chassis that correspond to OVN logical ports.  We use this for
detecting when an interface has been removed as well as if child-ports
should be bound to this chassis.

Old values were not being removed from local_ids.  The most immediate
effect of this was that once an interface has been removed from a
chassis, we would think a removal has occured *every* time through
binding_run and trigger the full binding processing.  This was
a performance problem.

The second problem this would cause is if a port that had child ports
was moved to another chassis.  We would end up with two chassis fighting
over the binding of the child ports.

Signed-off-by: Russell Bryant <[email protected]>
Acked-by: Ryan Moats <[email protected]>
  • Loading branch information
russellb committed Jul 29, 2016
1 parent 0c87efe commit 5db68db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ovn/controller/binding.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ get_local_iface_ids(const struct ovsrec_bridge *br_int,
* that has been removed. */
if (!changed && !sset_is_empty(&old_local_ids)) {
changed = true;

const char *cur_id;
SSET_FOR_EACH(cur_id, &old_local_ids) {
sset_find_and_delete(&local_ids, cur_id);
}
}

sset_destroy(&old_local_ids);
Expand Down

0 comments on commit 5db68db

Please sign in to comment.