Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
unspecified
-
None
-
None
-
Operating System: All
Platform: All
-
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":
,"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]#