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))
Reproduce steps: no_external
l3 agent mode:
network node:dvr_snat
compute node:dvr_
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. d_fip_cidr_ set(self, device): _get_cidrs_ from_keepalived (device. name))
Adding following code in [1] can solve this problem:
def _get_centralize
"""Returns the fip_cidr set for centralized floatingips."""
return set(self.
[1]https:/ /github. com/openstack/ neutron/ blob/master/ neutron/ agent/l3/ dvr_edge_ ha_router. py