Comment 11 for bug 1465434

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/196908
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9eed4167b63f0c0ad6c7ceeedc644e511c8dac75
Submitter: Jenkins
Branch: master

commit 9eed4167b63f0c0ad6c7ceeedc644e511c8dac75
Author: Swaminathan Vasudevan <email address hidden>
Date: Mon Jun 29 16:19:49 2015 -0700

    Fix update_port_postcommit and port not found with DVR

    Updating DVR Router interface ports was throwing
    errors in the l2pop mechanism drivers function
    update_port_postcommit.

    PortContext's portbinding information does not show
    the status of the ports. For DVR Router interface
    ports the DVRPortbinding table contains the status
    information for the ports.

    In the case of the update_port method, there was
    no code related to DVR that retreives the port
    binding information from the DVRPortBinding table.

    This was working before, since in the driver_context,
    the PortContext was just returning the port status for
    all router interfaces.

    With the recent refactor to the driver_context, this
    behavior changed and the PortContext was returning the
    _binding.status for the DVR router interface ports and
    the _port.status for the non DVR ports.

    When the update_port function calls update_port_postcommit
    with PortContext for DVR router interface ports, l2pop
    was throwing an error saying that Portbinding does not
    have the attribute 'status'.

    This was causing addition of any second subnet to the
    same network with respect to IPv6 to fail.
    Because in the case of IPv6, when you add additional
    subnets to the existing network, it just updates the port
    with the IPv6 prefix instead of creating additional port.

    In the case of IPv4 still we could see that there are
    two different ports created for each subnet we try to
    add.

    This patch fixes the above issue in l2pop and allows the
    DVR router interface ports to be successfull.

    Also the _find_ipv6_router_port_by_network was returning
    all the ports for DVR including the DVR CSNAT internal
    ports which are not part of the router interface ports.

    This patch also fixes this problem by returning false,
    when it finds a DVR SNAT port.

    Closes-Bug: #1465434

    Change-Id: Id243a4b3f30071226411ace6d12550fc099901cc