[VPNSERVICE-11] When port which is bound to vpnservice is deleted , the corresponding entries in the switch are not removed Created: 03/Jun/15  Updated: 30/Oct/17  Resolved: 07/Aug/15

Status: Resolved
Project: vpnservice
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Sindhuri B Assignee: Sasidharan Sambasivam
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 2dpns.zip     Zip Archive 3558.zip    
Severity: normal
External issue ID: 3558

 Description   

Topology:
========
2 dpns with gre configured b/w and 4 hosts each.
Can be reproduced with single host as well.

Deleting port using ovs-vsctl del-port:
======================================
mininet@mininet-vm2:~$ sudo ovs-vsctl show
aaa4c93f-aa5a-4e41-b565-47c6f100c291
Bridge "s1"
Controller "tcp:100.96.2.129:6633"
is_connected: true
fail_mode: secure
Port "s1"
Interface "s1"
type: internal
Port "s1-gre1"
Interface "s1-gre1"
type: gre
options:

{local_ip="192.168.56.103", remote_ip="192.168.56.104"}
Port "s1-eth2"
Interface "s1-eth2"
Port "s1-eth1"
Interface "s1-eth1"
Port "s1-eth3"
Interface "s1-eth3"
Port "s1-gre2"
Interface "s1-gre2"
type: gre
options: {local_ip="192.168.56.103", remote_ip="192.168.56.105"}
Port "s1-eth4"
Interface "s1-eth4"
ovs_version: "2.3.90"

mininet@mininet-vm2:~$ sudo ovs-vsctl del-port s1 s1-eth1
mininet@mininet-vm2:~$ sudo ovs-vsctl show
aaa4c93f-aa5a-4e41-b565-47c6f100c291
Bridge "s1"
Controller "tcp:100.96.2.129:6633"
is_connected: true
fail_mode: secure
Port "s1"
Interface "s1"
type: internal
Port "s1-gre1"
Interface "s1-gre1"
type: gre
options: {local_ip="192.168.56.103", remote_ip="192.168.56.104"}

Port "s1-eth2"
Interface "s1-eth2"
Port "s1-eth3"
Interface "s1-eth3"
Port "s1-gre2"
Interface "s1-gre2"
type: gre
options:

{local_ip="192.168.56.103", remote_ip="192.168.56.105"}

Port "s1-eth4"
Interface "s1-eth4"
ovs_version: "2.3.90"

s1-eth1 removed from the switch s1.

Entries still present in switch:
===============================
On local dpn:
=============

mininet> dpctl dump-flows -O OpenFlow13

      • s1 ------------------------------------------------------------------------
        OFPST_FLOW reply (OF1.3) (xid=0x2):
        cookie=0x0, duration=9216.231s, table=0, n_packets=30, n_bytes=1260, arp actions=FLOOD
        cookie=0x8000001, duration=3261.468s, table=0, n_packets=1018, n_bytes=86751, priority=10,in_port=5 actions=goto_table:20
        cookie=0x8000001, duration=3261.468s, table=0, n_packets=11, n_bytes=1078, priority=10,in_port=1 actions=write_metadata:0x1/0xffffffff,goto_table:21 -------> To be deleted
        cookie=0x8000001, duration=3261.468s, table=0, n_packets=10, n_bytes=980, priority=10,in_port=2 actions=write_metadata:0x1/0xffffffff,goto_table:21
        cookie=0x8000001, duration=3261.468s, table=0, n_packets=22, n_bytes=2156, priority=10,in_port=3 actions=write_metadata:0x2/0xffffffff,goto_table:21
        cookie=0x8000002, duration=3261.468s, table=20, n_packets=5, n_bytes=510, priority=10,mpls,mpls_label=4 actions=write_actions(group:4)
        cookie=0x8000002, duration=3261.468s, table=20, n_packets=5, n_bytes=510, priority=10,mpls,mpls_label=3 actions=write_actions(group:3)
        cookie=0x8000002, duration=3261.468s, table=20, n_packets=3, n_bytes=306, priority=10,mpls,mpls_label=5 actions=write_actions(group:5)
        cookie=0x8000003, duration=3261.468s, table=21, n_packets=4, n_bytes=392, priority=42,ip,metadata=0x1/0xffffffff,nw_dst=10.0.0.1 actions=write_actions(push_mpls:0x8847,set_field:3->mpls_label,group:3) ---------->To be deleted
        cookie=0x8000003, duration=3261.468s, table=21, n_packets=4, n_bytes=392, priority=42,ip,metadata=0x1/0xffffffff,nw_dst=10.0.0.2 actions=write_actions(push_mpls:0x8847,set_field:4->mpls_label,group:4)
        cookie=0x8000003, duration=3261.468s, table=21, n_packets=0, n_bytes=0, priority=42,ip,metadata=0x2/0xffffffff,nw_dst=11.0.0.1 actions=write_actions(push_mpls:0x8847,set_field:5->mpls_label,group:5)
        cookie=0x8000003, duration=3261.468s, table=21, n_packets=4, n_bytes=392, priority=42,ip,metadata=0x2/0xffffffff,nw_dst=11.0.0.3 actions=write_actions(push_mpls:0x8847,set_field:6->mpls_label,group:2)
        cookie=0x8000003, duration=3261.468s, table=21, n_packets=7, n_bytes=686, priority=42,ip,metadata=0x1/0xffffffff,nw_dst=10.0.0.3 actions=write_actions(push_mpls:0x8847,set_field:7->mpls_label,group:2)
        cookie=0x8000003, duration=3261.468s, table=21, n_packets=6, n_bytes=588, priority=42,ip,metadata=0x1/0xffffffff,nw_dst=10.0.0.4 actions=write_actions(push_mpls:0x8847,set_field:8->mpls_label,group:2)
        mininet> dpctl dump-groups -O OpenFlow13
      • s1 ------------------------------------------------------------------------
        OFPST_GROUP_DESC reply (OF1.3) (xid=0x2):
        group_id=4,type=indirect,bucket=weight:0,actions=pop_mpls:0x0800,set_field:00:00:00:00:00:02->eth_dst,output:2
        group_id=5,type=indirect,bucket=weight:0,actions=pop_mpls:0x0800,set_field:00:00:00:00:00:03->eth_dst,output:3
        group_id=2,type=indirect,bucket=weight:0,actions=output:5
        group_id=3,type=indirect,bucket=weight:0,actions=pop_mpls:0x0800,set_field:00:00:00:00:00:01->eth_dst,output:1 ----------->to be deleted

On remote dpn:
=============
mininet> dpctl dump-flows -O OpenFlow13

      • s2 ------------------------------------------------------------------------
        OFPST_FLOW reply (OF1.3) (xid=0x2):
        cookie=0x0, duration=9820.616s, table=0, n_packets=30, n_bytes=1260, arp actions=FLOOD
        cookie=0x8000001, duration=3873.333s, table=0, n_packets=1145, n_bytes=97614, priority=10,in_port=5 actions=goto_table:20
        cookie=0x8000001, duration=3873.333s, table=0, n_packets=3, n_bytes=294, priority=10,in_port=3 actions=write_metadata:0x2/0xffffffff,goto_table:21
        cookie=0x8000001, duration=3873.333s, table=0, n_packets=5, n_bytes=490, priority=10,in_port=1 actions=write_metadata:0x1/0xffffffff,goto_table:21
        cookie=0x8000001, duration=3873.333s, table=0, n_packets=5, n_bytes=490, priority=10,in_port=2 actions=write_metadata:0x1/0xffffffff,goto_table:21
        cookie=0x8000002, duration=3873.333s, table=20, n_packets=4, n_bytes=408, priority=10,mpls,mpls_label=6 actions=write_actions(group:6)
        cookie=0x8000002, duration=3873.333s, table=20, n_packets=7, n_bytes=714, priority=10,mpls,mpls_label=7 actions=write_actions(group:7)
        cookie=0x8000002, duration=3873.333s, table=20, n_packets=6, n_bytes=612, priority=10,mpls,mpls_label=8 actions=write_actions(group:8)
        cookie=0x8000003, duration=3873.333s, table=21, n_packets=5, n_bytes=490, priority=42,ip,metadata=0x1/0xffffffff,nw_dst=10.0.0.1 actions=write_actions(push_mpls:0x8847,set_field:3->mpls_label,group:1) --------->to be deleted
        cookie=0x8000003, duration=3873.333s, table=21, n_packets=5, n_bytes=490, priority=42,ip,metadata=0x1/0xffffffff,nw_dst=10.0.0.2 actions=write_actions(push_mpls:0x8847,set_field:4->mpls_label,group:1)
        cookie=0x8000003, duration=3873.333s, table=21, n_packets=3, n_bytes=294, priority=42,ip,metadata=0x2/0xffffffff,nw_dst=11.0.0.1 actions=write_actions(push_mpls:0x8847,set_field:5->mpls_label,group:1)
        cookie=0x8000003, duration=3873.333s, table=21, n_packets=0, n_bytes=0, priority=42,ip,metadata=0x2/0xffffffff,nw_dst=11.0.0.3 actions=write_actions(push_mpls:0x8847,set_field:6->mpls_label,group:6)
        cookie=0x8000003, duration=3873.333s, table=21, n_packets=0, n_bytes=0, priority=42,ip,metadata=0x1/0xffffffff,nw_dst=10.0.0.3 actions=write_actions(push_mpls:0x8847,set_field:7->mpls_label,group:7)
        cookie=0x8000003, duration=3873.333s, table=21, n_packets=0, n_bytes=0, priority=42,ip,metadata=0x1/0xffffffff,nw_dst=10.0.0.4 actions=write_actions(push_mpls:0x8847,set_field:8->mpls_label,group:8)
        mininet>

Ping fails as the port is deleted:
=================================
mininet> h1 ping h2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
^C
— 10.0.0.2 ping statistics —
3 packets transmitted, 0 received, 100% packet loss, time 2018ms

mininet>

From operational datastore of ietf interface:
=============================================
{
"interfaces-state": {
"interface": [

{ "name": "s1-eth1", "if-index": 2, "admin-status": "up", "oper-status": "down", "type": "iana-if-type:l2vlan" }

,
{
"name": "s1-eth2",
"if-index": 1,

Port is not present in the operational datastore.

Refer to frame 898 in s1.pcap for port status message with port delete reason



 Comments   
Comment by Sindhuri B [ 03/Jun/15 ]

Attachment 2dpns.zip has been added with description: configuration and logs

Comment by Sindhuri B [ 24/Jun/15 ]

Verification Failed. Wrong entries got removed in the local dpn.

Local dpn:
=========
mininet> dpctl dump-flows -O OpenFlow13

      • s2 ------------------------------------------------------------------------
        OFPST_FLOW reply (OF1.3) (xid=0x2):
        cookie=0x0, duration=221.763s, table=0, n_packets=4, n_bytes=168, arp actions=FLOOD
        cookie=0x8000001, duration=221.834s, table=0, n_packets=49, n_bytes=4233, priority=10,in_port=3 actions=goto_table:20
        cookie=0x8000002, duration=221.738s, table=20, n_packets=4, n_bytes=408, priority=10,mpls,mpls_label=3 actions=write_actions(group:4)
        cookie=0x8000003, duration=221.740s, table=21, n_packets=0, n_bytes=0, priority=42,ip,metadata=0x1/0xffffffff,nw_dst=10.0.0.3 actions=write_actions(push_mpls:0x8847,set_field:3->mpls_label,group:4)--->Entry to be deleted. Instead entry for 10.0.0.1 got deleted.
        mininet> dpctl dump-groups -O OpenFlow13
      • s2 ------------------------------------------------------------------------
        OFPST_GROUP_DESC reply (OF1.3) (xid=0x2):
        group_id=1,type=indirect,bucket=weight:0,actions=output:3
        group_id=4,type=indirect,bucket=weight:0,actions=pop_mpls:0x0800,set_field:00:00:00:00:00:03->eth_dst,output:1
        mininet>

Remote dpn:
==========
mininet> dpctl dump-flows -O OpenFlow13

      • s1 ------------------------------------------------------------------------
        OFPST_FLOW reply (OF1.3) (xid=0x2):
        cookie=0x0, duration=604.282s, table=0, n_packets=4, n_bytes=168, arp actions=FLOOD
        cookie=0x8000001, duration=368.344s, table=0, n_packets=78, n_bytes=6681, priority=10,in_port=3 actions=goto_table:20
        cookie=0x8000001, duration=353.223s, table=0, n_packets=4, n_bytes=392, priority=10,in_port=1 actions=write_metadata:0x1/0xffffffff,goto_table:21
        cookie=0x8000002, duration=353.111s, table=20, n_packets=3, n_bytes=306, priority=10,mpls,mpls_label=7 actions=write_actions(group:8)
        cookie=0x8000003, duration=353.116s, table=21, n_packets=0, n_bytes=0, priority=42,ip,metadata=0x1/0xffffffff,nw_dst=10.0.0.1 actions=write_actions(push_mpls:0x 8847,set_field:7->mpls_label,group:8)
        mininet> dpctl dump-groups -O OpenFlow13
      • s1 ------------------------------------------------------------------------
        OFPST_GROUP_DESC reply (OF1.3) (xid=0x2):
        group_id=8,type=indirect,bucket=weight:0,actions=pop_mpls:0x0800,set_field:00:00:00:00:00:01->eth_dst,output:1
        group_id=2,type=indirect,bucket=weight:0,actions=output:3
        mininet>
Comment by Sindhuri B [ 24/Jun/15 ]

Attachment 3558.zip has been added with description: Failure logs in verification

Comment by Sindhuri B [ 10/Jul/15 ]

workaround:
-=========
Delete manually from config DS

Comment by Vishal Thapar [ 07/Aug/15 ]

Fixed by https://git.opendaylight.org/gerrit/#/c/22171/

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