Configure DVR fip router fail when l3 agent restarts and it cannot be recovered

Bug #1564757 reported by RaoFei
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

* Issue Description
When creating a fip and l3 agent is restarted, if the veth devices(rtr and fip) are created but the ip addresses are not configured. it will cause the IP address cannot be configure no more, even if the l3 agent restart.

* Pre-conditions
Create a fip and the fip status is active. The external public network can access fip successfully.

* Step-by-step and Result
1. loop create and delete fip on neutron-server side.
2. loop restart l3 agent.
3. the FIP status becomes ERROR. The external public network access fip unsuccessfully.

* Version
  from Juno->Latest

* Analysis
 The processing of the link from rtr to fip is 1) if veth is not existed, then create it. and then configure ip addresses. 2) if veth is existed, then configure router.

if veth device is not existed:
    create veth devices -------Here l3 implement stopped. the ip address are not configured
    configure veth devices ip address

create router -----Here configure router failed due to no ip address on the veth interfaces

    def create_rtr_2_fip_link(self, ri):
        """Create interface between router and Floating IP namespace."""
        LOG.debug("Create FIP link interfaces for router %s", ri.router_id)
        rtr_2_fip_name = self.get_rtr_ext_device_name(ri.router_id)
        fip_2_rtr_name = self.get_int_device_name(ri.router_id)
        fip_ns_name = self.get_name()

        # add link local IP to interface
        if ri.rtr_fip_subnet is None:
            ri.rtr_fip_subnet = self.local_subnets.allocate(ri.router_id)
        rtr_2_fip, fip_2_rtr = ri.rtr_fip_subnet.get_pair()
        ip_wrapper = ip_lib.IPWrapper(namespace=ri.ns_name)
        device_exists = ip_lib.device_exists(rtr_2_fip_name,
        if not device_exists:
            int_dev = ip_wrapper.add_veth(rtr_2_fip_name,
            if self.agent_conf.network_device_mtu:

        # add default route for the link local interface
        device = ip_lib.IPDevice(rtr_2_fip_name, namespace=ri.ns_name)
        device.route.add_gateway(str(fip_2_rtr.ip), table=FIP_RT_TBL)
        #setup the NAT rules and chains

Revision history for this message
RaoFei (milo-frao) wrote :

I will commit a patch for this issue. If you are also follow with interest l3-dvr, please raise your comment.

Changed in neutron:
assignee: nobody → RaoFei (milo-frao)
Revision history for this message
Swaminathan Vasudevan (swaminathan-vasudevan) wrote :

I will take a look at it.

Revision history for this message
Swaminathan Vasudevan (swaminathan-vasudevan) wrote :

Do you have the L3 agent logs, when this error occurs. If you have the logs, can you upload the logs to pastebin and paste the link here.

Revision history for this message
Swaminathan Vasudevan (swaminathan-vasudevan) wrote :

This may be a duplicate of 1566383

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers