Comment 0 for bug 1740450

Revision history for this message
sunzuohua (zuohuasun) wrote :

Reproduce steps:
l3 agent mode:
    network node:dvr_snat
    compute node:dvr_no_external
1、Create dvr+ha.
2、Set router gateway and add router interface.
3、Create vm and associate fip.
4、Restart l3 agent.
5、Restart l3 agent again.

After step 3, fip can be found in snat ns on network node.
After step 4, fip can not be found in snat ns on network node.
After step 5, fip can be found again in snat ns on network node.

The reason mybe that for ha router, router cidrs should be seek from keepalived instance, not from device.
Adding following code in [1] can solve this problem:
    def _get_centralized_fip_cidr_set(self, device):
        """Returns the fip_cidr set for centralized floatingips."""
        return set(self._get_cidrs_from_keepalived(device.name))

[1]https://github.com/openstack/neutron/blob/master/neutron/agent/l3/dvr_edge_ha_router.py