[OVSDB-310] DHCP port ARP flows not removed in compute node after deleting all the instance belongs to the network Created: 03/Mar/16  Updated: 30/Oct/17  Resolved: 01/Apr/16

Status: Resolved
Project: ovsdb
Component/s: openstack.net-virt
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Hari Prasidh Assignee: Hari Prasidh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Zip Archive karaf_logs.zip    
External issue ID: 5456

 Description   

I am analysing arp responder service in L2 scenario.

I did a simple deletion test. For that am using 1 control node and 2 compute nodes (Compute1 and Compute2).

I Created 4 Networks (tenant1, tenant2, tenant3 and tenant4) and then created 4 Vm instances in control and 4 vms in compute1

while create scenario, the arp flows are installed as expected, but in the delete scenario arp flows are not deleted for dhcp port for compute1.

I deleted all the VMs from control and compute1 but still the arp flows for dhcp port are not deleted from compute1.

If we deleted any one of the network, then all arp flows are deleted from compute1.

Is this expected behaviour ?

Please find below dump flows for compute1 node

Compute1:

Created 4 Vm instances:

cookie=0x0, duration=17.736s, table=20, n_packets=0, n_bytes=0, priority=1024,arp,tun_id=0x442,arp_tpa=40.0.0.1,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:ff:b8:b4>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163effb8b4->NXM_NX_ARP_SHA[],load:0x28000001->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=96.335s, table=20, n_packets=0, n_bytes=0, priority=1024,arp,tun_id=0x40e,arp_tpa=30.0.0.2,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:5a:b7:f4>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163e5ab7f4->NXM_NX_ARP_SHA[],load:0x1e000002->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=171.663s, table=20, n_packets=1, n_bytes=42, priority=1024,arp,tun_id=0x41f,arp_tpa=10.0.0.1,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:e8:97:07>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163ee89707->NXM_NX_ARP_SHA[],load:0xa000001->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=138.739s, table=20, n_packets=0, n_bytes=0, priority=1024,arp,tun_id=0x3f8,arp_tpa=20.0.0.3,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:9a:98:9c>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163e9a989c->NXM_NX_ARP_SHA[],load:0x14000003->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=18.132s, table=20, n_packets=0, n_bytes=0, priority=1024,arp,tun_id=0x442,arp_tpa=40.0.0.3,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:93:26:f5>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163e9326f5->NXM_NX_ARP_SHA[],load:0x28000003->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=17.695s, table=20, n_packets=0, n_bytes=0, priority=1024,arp,tun_id=0x442,arp_tpa=40.0.0.2,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:3c:dc:a4>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163e3cdca4->NXM_NX_ARP_SHA[],load:0x28000002->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=96.439s, table=20, n_packets=0, n_bytes=0, priority=1024,arp,tun_id=0x40e,arp_tpa=30.0.0.3,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:20:3a:9a>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163e203a9a->NXM_NX_ARP_SHA[],load:0x1e000003->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=138.671s, table=20, n_packets=1, n_bytes=42, priority=1024,arp,tun_id=0x3f8,arp_tpa=20.0.0.1,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:f8:49:9a>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163ef8499a->NXM_NX_ARP_SHA[],load:0x14000001->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=171.417s, table=20, n_packets=0, n_bytes=0, priority=1024,arp,tun_id=0x41f,arp_tpa=10.0.0.2,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:9d:7a:12>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163e9d7a12->NXM_NX_ARP_SHA[],load:0xa000002->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=96.772s, table=20, n_packets=1, n_bytes=42, priority=1024,arp,tun_id=0x40e,arp_tpa=30.0.0.1,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:6d:c2:e7>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163e6dc2e7->NXM_NX_ARP_SHA[],load:0x1e000001->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=171.974s, table=20, n_packets=0, n_bytes=0, priority=1024,arp,tun_id=0x41f,arp_tpa=10.0.0.3,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:d2:be:f1>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163ed2bef1->NXM_NX_ARP_SHA[],load:0xa000003->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=139.036s, table=20, n_packets=0, n_bytes=0, priority=1024,arp,tun_id=0x3f8,arp_tpa=20.0.0.2,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:9e:5b:1b>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163e9e5b1b->NXM_NX_ARP_SHA[],load:0x14000002->NXM_OF_ARP_SPA[],IN_PORT

Deleted all Vm's:

cookie=0x0, duration=93.716s, table=20, n_packets=1, n_bytes=42, priority=1024,arp,tun_id=0x442,arp_tpa=40.0.0.1,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:ff:b8:b4>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163effb8b4->NXM_NX_ARP_SHA[],load:0x28000001->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=247.643s, table=20, n_packets=1, n_bytes=42, priority=1024,arp,tun_id=0x41f,arp_tpa=10.0.0.1,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:e8:97:07>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163ee89707->NXM_NX_ARP_SHA[],load:0xa000001->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=214.651s, table=20, n_packets=1, n_bytes=42, priority=1024,arp,tun_id=0x3f8,arp_tpa=20.0.0.1,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:f8:49:9a>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163ef8499a->NXM_NX_ARP_SHA[],load:0x14000001->NXM_OF_ARP_SPA[],IN_PORT
cookie=0x0, duration=172.752s, table=20, n_packets=1, n_bytes=42, priority=1024,arp,tun_id=0x40e,arp_tpa=30.0.0.1,arp_op=1 actions=move:NXM_OF_ETH_SRC[]>NXM_OF_ETH_DST[],set_field:fa:16:3e:6d:c2:e7>eth_src,load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]>NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]>NXM_OF_ARP_TPA[],load:0xfa163e6dc2e7->NXM_NX_ARP_SHA[],load:0x1e000001->NXM_OF_ARP_SPA[],IN_PORT

Deleted Network (tenant2):

[stack@compute1 devstack]$ sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=2473.923s, table=0, n_packets=0, n_bytes=0, dl_type=0x88cc actions=CONTROLLER:65535
cookie=0x0, duration=2473.923s, table=0, n_packets=115, n_bytes=29318, priority=0 actions=goto_table:20
cookie=0x0, duration=2473.940s, table=20, n_packets=275, n_bytes=49234, priority=0 actions=goto_table:30
cookie=0x0, duration=2473.897s, table=30, n_packets=275, n_bytes=49234, priority=0 actions=goto_table:40
cookie=0x0, duration=1709.091s, table=40, n_packets=6, n_bytes=468, priority=61007,ipv6,dl_src=fa:16:3e:d2:be:f1 actions=goto_table:50
cookie=0x0, duration=1676.653s, table=40, n_packets=6, n_bytes=468, priority=61007,ipv6,dl_src=fa:16:3e:9a:98:9c actions=goto_table:50
cookie=0x0, duration=1632.241s, table=40, n_packets=13, n_bytes=1670, priority=61007,ip,dl_src=fa:16:3e:20:3a:9a actions=goto_table:50
cookie=0x0, duration=1556.208s, table=40, n_packets=13, n_bytes=1670, priority=61007,ip,dl_src=fa:16:3e:93:26:f5 actions=goto_table:50
cookie=0x0, duration=2473.940s, table=40, n_packets=237, n_bytes=44958, priority=0 actions=goto_table:50
cookie=0x0, duration=2473.923s, table=50, n_packets=275, n_bytes=49234, priority=0 actions=goto_table:60
cookie=0x0, duration=2473.923s, table=60, n_packets=275, n_bytes=49234, priority=0 actions=goto_table:70
cookie=0x0, duration=2473.953s, table=70, n_packets=275, n_bytes=49234, priority=0 actions=goto_table:80
cookie=0x0, duration=2473.923s, table=80, n_packets=275, n_bytes=49234, priority=0 actions=goto_table:90
cookie=0x0, duration=1557.278s, table=90, n_packets=13, n_bytes=1703, priority=61007,ip,dl_dst=fa:16:3e:93:26:f5 actions=goto_table:100
cookie=0x0, duration=1638.385s, table=90, n_packets=13, n_bytes=1703, priority=61007,ip,dl_dst=fa:16:3e:9a:98:9c actions=goto_table:100
cookie=0x0, duration=1632.858s, table=90, n_packets=13, n_bytes=1703, priority=61007,ip,dl_dst=fa:16:3e:20:3a:9a actions=goto_table:100
cookie=0x0, duration=1680.468s, table=90, n_packets=13, n_bytes=1703, priority=61007,ip,dl_dst=fa:16:3e:d2:be:f1 actions=goto_table:100
cookie=0x0, duration=2473.940s, table=90, n_packets=223, n_bytes=42422, priority=0 actions=goto_table:100
cookie=0x0, duration=2473.953s, table=100, n_packets=275, n_bytes=49234, priority=0 actions=goto_table:110
cookie=0x0, duration=2046.043s, table=110, n_packets=11, n_bytes=1000, tun_id=0x41f,dl_dst=fa:16:3e:e8:97:07 actions=output:1
cookie=0x0, duration=1958.904s, table=110, n_packets=11, n_bytes=1000, tun_id=0x40e,dl_dst=fa:16:3e:6d:c2:e7 actions=output:1
cookie=0x0, duration=1933.314s, table=110, n_packets=11, n_bytes=1000, tun_id=0x442,dl_dst=fa:16:3e:ff:b8:b4 actions=output:1
cookie=0x0, duration=2473.923s, table=110, n_packets=147, n_bytes=33870, priority=0 actions=drop



 Comments   
Comment by Hari Prasidh [ 03/Mar/16 ]

Attachment karaf_logs.zip has been added with description: Karaf_logs

Comment by Oded Shvartz [ 06/Mar/16 ]

From a quick look at the code I think that it happens because the first thing that we do in Delete Port is calling the "distributedArpService" and cleaning all the ARP flows.
In this stage we check if the network exist on the node and because we didn't delete the port yet we mark the rules as "arpNeeded=true" for this specific node.
Only in the end of the Delete port process (after calling the "distributedArpService" and the "neutronL3Adapter") we delete the port.

The flows are being deleted once you delete one of the other networks, because in this stage the network does not exist on the node and the flows are marked as "arpNeeded=false"

Comment by Hari Prasidh [ 29/Mar/16 ]

be : https://git.opendaylight.org/gerrit/#/c/36769/
master : https://git.opendaylight.org/gerrit/#/c/36588/

Comment by Hari Prasidh [ 01/Apr/16 ]

(In reply to hari prasad from comment #2)
> be : https://git.opendaylight.org/gerrit/#/c/36769/
> master : https://git.opendaylight.org/gerrit/#/c/36588/

Fixed this bug,

Patch pushed to Be & Master. please find above links.

Generated at Wed Feb 07 20:36:03 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.