← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1668277] Re: When enable l2pop, after deleting the DVR port, the associated flow entries still exists.

 

Reviewed:  https://review.openstack.org/438516
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3593620faa37322a1aaf1ce0c0ae3065ec623c2f
Submitter: Jenkins
Branch:    master

commit 3593620faa37322a1aaf1ce0c0ae3065ec623c2f
Author: Yaohua Yan <yanyaohua@xxxxxxxxxx>
Date:   Mon Feb 27 22:26:08 2017 +0800

    Change the way to distinguish the port type
    
    In delete_port_postcommit, a DVR port (port['device_owner'] =
    DEVICE_OWNER_ROUTER_SNAT) can match on l2pop_db.HA_ROUTER_PORTS[1],
    but can not get any fdb entries by _get_ha_port_agents_fdb. Then,
    the fdb_entries[network_id]['ports'] is been overwritten by {}. So
    the associated flow entries will not be deleted.
    
    Closes-Bug: #1668277
    Change-Id: I7b621157fe85945acd99e4f08b6370d2f9c3d44d


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1668277

Title:
  When enable l2pop, after deleting the DVR port, the associated flow
  entries still exists.

Status in neutron:
  Fix Released

Bug description:
  This results in a large number of useless flow entries in the br-tun
  flow table, and they will not be aged.

  Steps to reproduce:
  1. Create a DVR router
     neutron router-create Router --distributed True --ha False

  2. Create an internal network and a subnet
     neutron net-create Network	
     neutron subnet-create Network 10.0.0.0/24 --name Subnet

  3. Set gateway and add subnet to Router
     neutron router-gateway-set Router ext-net
     neutron router-interface-add Router Subnet

  4. Boot an instance in Network
     nova boot --image <image_id> --flavor <flavor_id> --nic net_id=<net_id> VM

  5. Login into VM using ssh or VNC console, and ping the Router to confirm network connectivity
     ping 10.0.0.1

  6. Check the MAC of the DVR SNAT port
     neutron router-port-list Router
  +--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+
  | id                                   | name | mac_address       | fixed_ips                                                                            |
  +--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+
  | 1bb7d911-1e25-4168-9cce-dd002798eaa0 |      | fa:16:3e:24:85:25 | {"subnet_id": "62c3fd6f-39a9-4e59-aed2-84cf416f46f0", "ip_address": "10.0.0.11"}     |
  | 658b362c-ab0b-4c20-b574-7798eef2f1dc |      | fa:16:3e:2c:91:7a | {"subnet_id": "40819ff3-6844-4e29-afd8-89b0c6b1078f", "ip_address": "172.16.55.134"} |
  | 7096d242-58a3-449b-af67-c8c11ca0caa0 |      | fa:16:3e:52:9d:4c | {"subnet_id": "62c3fd6f-39a9-4e59-aed2-84cf416f46f0", "ip_address": "10.0.0.1"}      |
  +--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+
     neutron port-show 1bb7d911-1e25-4168-9cce-dd002798eaa0
  +-----------------------+----------------------------------------------------------------------------------+
  | Field                 | Value                                                                            |
  +-----------------------+----------------------------------------------------------------------------------+
  | device_owner          | network:router_centralized_snat                                                  |
  | fixed_ips             | {"subnet_id": "62c3fd6f-39a9-4e59-aed2-84cf416f46f0", "ip_address": "10.0.0.11"} |
  | id                    | 1bb7d911-1e25-4168-9cce-dd002798eaa0                                             |
  | mac_address           | fa:16:3e:24:85:25                                                                |
  +-----------------------+----------------------------------------------------------------------------------+

  7. Check the flow entries in compute node
     sudo ovs-ofctl dump-flows br-tun | grep fa:16:3e:24:85:25
  cookie=0x0, duration=18.515s, table=20, n_packets=0, n_bytes=0, hard_timeout=300, idle_age=18, priority=1,vlan_tci=0x0025/0x0fff,dl_dst= fa:16:3e:24:85:25 actions=load:0->NXM_OF_VLAN_TCI[],load:0x10067->NXM_NX_TUN_ID[],output:32
  cookie=0x0, duration=18.866s, table=20, n_packets=0, n_bytes=0, idle_age=18, priority=2,dl_vlan=37,dl_dst= fa:16:3e:24:85:25 actions=strip_vlan,set_tunnel:0x10067,output:32

  8. Delete the port
     neutron router-interface-delete Router Subnet

  9. Check the flow entry in compute node again
     sudo ovs-ofctl dump-flows br-tun | grep fa:16:3e:24:85:25
  cookie=0x0, duration=1733.776s, table=20, n_packets=0, n_bytes=0, hard_timeout=300, idle_age=1733, hard_age=280, priority=1,vlan_tci=0x0025/0x0fff,dl_dst= fa:16:3e:24:85:25 actions=load:0->NXM_OF_VLAN_TCI[],load:0x10067->NXM_NX_TUN_ID[],output:32
  cookie=0x0, duration=1734.126s, table=20, n_packets=9, n_bytes=538, idle_age=280, priority=2,dl_vlan=37,dl_dst= fa:16:3e:24:85:25 actions=strip_vlan,set_tunnel:0x10067,output:32

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1668277/+subscriptions


References