[VTN-127] Issue in audit scenarios for delete operation of vbrif OUT flowfilter Created: 18/Mar/16  Updated: 19/Oct/17  Resolved: 16/May/16

Status: Resolved
Project: vtn
Component/s: ODC Driver
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: YOGA LAKSHMI SWETHA PAYYAVULA Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 5557

 Description   

Issue: During the audit for the vbridge interface OUT flowfilter the delete operation is not successful.

REPORDUCE the issue:

Create Controller :
curl --user admin:adminpass -H 'content-type: application/json' -X POST \
http://127.0.0.1:8083/vtn-webapi/controllers.json \
-d '{"controller": {"controller_id": "controller1", "ipaddr":"10.100.9.61", "type": "odc", "version": "1.0", "auditstatus":"enable"}}'

Create vtn:
curl --user admin:adminpass -H 'content-type: application/json' -X POST -d \
'{"vtn" : {"vtn_name":"vtn_one","description":"test VTN" }}' http://127.0.0.1:8083/vtn-webapi/vtns.json

Create vbr:
curl --user admin:adminpass -H 'content-type: application/json' -X POST -d \
'{"vbridge" : {"vbr_name":"vbr_two","controller_id":"controller1","domain_id":"(DEFAULT)" }}' \
http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/vbridges.json

Create interfaces:
curl --user admin:adminpass -H 'content-type: application/json' -X POST -d \
'{"interface": {"if_name": "if1","description": "if_desc1"}}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/vbridges/vbr_two/interfaces.json

curl --user admin:adminpass -H 'content-type: application/json' -X POST -d \
'{"interface": {"if_name": "if2","description": "if_desc1"}}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/vbridges/vbr_two/interfaces.json

Portmapping:

curl --user admin:adminpass -H 'content-type: application/json' -X PUT -d \
'{"portmap":{"logical_port_id": "PP-OF:openflow:3-s3-eth1"}}' \
http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/vbridges/vbr_two/interfaces/if1/portmap.json

curl --user admin:adminpass -H 'content-type: application/json' -X PUT -d \
'{"portmap":{"logical_port_id": "PP-OF:openflow:2-s2-eth1"}}' \
http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/vbridges/vbr_two/interfaces/if2/portmap.json

Create Flowlist:
curl --user admin:adminpass -H 'content-type: application/json' -X POST -d \
'{"flowlist": {"fl_name": "flowlist1", "ip_version":"IP"}}' http://127.0.0.1:8083/vtn-webapi/flowlists.json

curl --user admin:adminpass -H 'content-type: application/json' -X POST -d \
'{"flowlistentry": {"seqnum": "233","macethertype": "0x800","ipdstaddr": "10.0.0.1","ipdstaddrprefix": "24","ipsrcaddr": "10.0.0.3","ipsrcaddrprefix": "24","ipproto": "1"}}' \
http://127.0.0.1:8083/vtn-webapi/flowlists/flowlist1/flowlistentries.json

Create Flowfilter:
curl --user admin:adminpass -X POST -H 'content-type: application/json' -d \
'{"flowfilter" : {"ff_type": "out"}}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/vbridges/vbr_two/interfaces/if1/flowfilters.json

curl --user admin:adminpass -X POST -H 'content-type: application/json' -d \
'{"flowfilterentry": {"seqnum": "233", "fl_name": "flowlist1", "action_type":"drop", "priority":"3", "dscp":"55" }}' \
http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/vbridges/vbr_two/interfaces/if1/flowfilters/out/flowfilterentries.json

Now disable audit for the controller:
curl -v --user admin:adminpass -H 'content-type: application/json' -X PUT http://127.0.0.1:8083/vtn-webapi/controllers/controller1.json -d '{"controller": {"controller_id": "controller1", "ipaddr":"10.106.138.191", "type": "odc", "version": "1.0", "auditstatus":"disable"}}'

Create another flowfilter with same sequence number but different direction for the same interface when controller in Down state:

curl --user admin:adminpass -X POST -H 'content-type: application/json' -d '{"flowfilterentry": {"seqnum": "231", "fl_name": "flowlist1", "action_type":"drop", "priority":"3", "dscp":"55" }}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/vbridges/vbr_two/interfaces/if1/flowfilters/in/flowfilterentries.json

curl -v --user admin:adminpass -X POST -H 'content-type: application/json' -d '{"flowfilterentry": {"seqnum": "233", "fl_name": "flowlist1", "action_type":"drop", "priority":"3", "dscp":"55" }}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/vbridges/vbr_two/interfaces/if1/flowfilters/in/flowfilterentries.json

Delete the flowfilter with OUT direction sequence number 233:

curl -v --user admin:adminpass -X DELETE -H 'content-type: application/json' http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/vbridges/vbr_two/interfaces/if1/flowfilters/out/flowfilterentries/233.json

Now enable audit in controller:

curl -v --user admin:adminpass -H 'content-type: application/json' -X PUT http://127.0.0.1:8083/vtn-webapi/controllers/controller1.json -d '{"controller": {"controller_id": "controller1", "ipaddr":"10.106.138.191", "type": "odc", "version": "1.0", "auditstatus":"enable"}}'

When flowfitler is fetched in the ODL controller:

curl --user "admin":"admin" -H "Content-type: application/json" -X GET http://localhost:8181/restconf/operational/vtn:vtns/
{"vtns":{"vtn":[{"name":"vtn_one","vtenant-config":

{"hard-timeout":0,"idle-timeout":300,"description":"test VTN"}

,"vbridge":[{"name":"vbr_two","vbridge-config":

{"age-interval":600}

,"bridge-status":

{"state":"DOWN","path-faults":0}

,"vinterface":[{"name":"if1","vinterface-status":

{"state":"DOWN","entity-state":"UNKNOWN"}

,"port-map-config":

{"vlan-id":0,"node":"openflow:3","port-name":"s3-eth1"}

,"vinterface-config":

{"description":"if_desc1","enabled":true}

,"vinterface-input-filter":{"vtn-flow-filter":[{"index":233,"condition":"flowlist1","vtn-flow-action":[{"order":1,"vtn-set-inet-dscp-action":{"dscp":55}},{"order":2,"vtn-set-vlan-pcp-action":{"vlan-pcp":3}}],"vtn-drop-filter":{}]},"vinterface-output-filter":{"vtn-flow-filter":[{"index":233,"condition":"flowlist1","vtn-flow-action":[{"order":1,"vtn-set-inet-dscp-action":{"dscp":55}},{"order":2,"vtn-set-vlan-pcp-action":{"vlan-pcp":3}}],"vtn-drop-filter":{}]},{"name":"if2","vinterface-status":

{"state":"DOWN","entity-state":"UNKNOWN"}

,"port-map-config":

{"vlan-id":0,"node":"openflow:2","port-name":"s2-eth1"}

,"vinterface-config":{"description":"if_desc1","enabled":true}}]}]}]}}[root@uncrhel64 data]#



 Comments   
Comment by Venkatrangan Govindarajan [ 16/May/16 ]

Patches Merged
https://git.opendaylight.org/gerrit/#/c/38862/
https://git.opendaylight.org/gerrit/#/c/38877

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