[ovs-dev] [PATCH] Remove old address set after change.

Ryan Moats rmoats at us.ibm.com
Thu Jul 7 16:24:25 UTC 2016


Currently, when address set value changes, ovn controller
doesn't remove the old entry from the tracking hash, it
just adds the new one, leading to multiple entries for the
same symbol.

Fix this behavior.

ToDo: figure out a test to avoid this in the future.

Signed-off-by: Ryan Moats <rmoats at us.ibm.com>
---
 ovn/controller/lflow.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ovn/controller/lflow.c b/ovn/controller/lflow.c
index 05e1eaf..00d1d6e 100644
--- a/ovn/controller/lflow.c
+++ b/ovn/controller/lflow.c
@@ -258,6 +258,7 @@ update_address_sets(struct controller_ctx *ctx)
              * if the symtab entry needs to be updated due to a change. */
             sset_find_and_delete(&cur_addr_set_names, addr_set_rec->name);
             if (!address_sets_match(addr_set, addr_set_rec)) {
+                shash_find_and_delete(&local_address_sets, addr_set_rec->name);
                 expr_macros_remove(&expr_address_sets, addr_set_rec->name);
                 address_set_destroy(addr_set);
                 addr_set = NULL;
-- 
2.7.4 (Apple Git-66)




More information about the dev mailing list