Comment 4 for bug 1675187

Revision history for this message
Arjun Baindur (abaindur) wrote :

Yeah, I added following to scan_fip_ports() function in dvr_fip_ns.py:

            existing_cidrs = [addr['cidr'] for addr in device.addr.list()]
            fip_cidrs = [c for c in existing_cidrs if
                         common_utils.is_cidr_host(c)]
            for fip_cidr in fip_cidrs:
                device.delete_addr_and_conntrack_state(fip_cidr)

That is inside the if device.exists() block. Not sure if that's really the right place to add it - this technically needs to be done just once.

On the other hand, looks like this function returns whenever it has a fip_count > 0 and only gets invoked on startup/when a router is created/updated first time with a gateway port? So maybe this is the best place to leave it in