[VTN-49] Fails to Set Actions for FlowFilter Created: 14/Nov/14  Updated: 08/Apr/19  Resolved: 05/Jan/15

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

Type: Bug
Reporter: Venkatrangan Govindarajan 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: 2387

 Description   

When Flow Filter is created, the Actions for FlowFilterEntry is not getting created. ODC Driver seems to be sending a wrong json request.



 Comments   
Comment by Karthik Sivasamy [ 19/Nov/14 ]

What works in Coodinator side:
To create Flowlist and Flowfilter through coordinator,

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

Step 2:
curl -v --user admin:adminpass -H 'content-type: application/json' -H 'ipaddr:127.0.0.1' -X POST -d '{"flowlistentry": {"seqnum": "1","macethertype": "0x8000","ipdstaddr": "10.0.0.3","ipdstaddrprefix": "2","ipsrcaddr": "10.0.0.2","ipsrcaddrprefix": "2","ipproto": "17","ipdscp": "55","icmptypenum":"232","icmpcodenum": "232"}}' http://127.0.0.1:8083/vtn-webapi/flowlists/flowlist1/flowlistentries.json

curl -v --user admin:adminpass -H 'content-type: application/json' -H 'ipaddr:127.0.0.1' -X POST -d '{"flowlistentry": {"seqnum": "2","macethertype": "0x8000","ipdstaddr": "10.0.0.3","ipdstaddrprefix": "2","ipsrcaddr": "10.0.0.2","ipsrcaddrprefix": "2","ipproto": "17","ipdscp": "55","icmptypenum":"232","icmpcodenum": "232"}}' http://127.0.0.1:8083/vtn-webapi/flowlists/flowlist1/flowlistentries.json

Issue: Here , create flowlist entry twice with two different "sequence number", because there is issue in coordinator where at first time flowlist entry not created in controller.
Step 3:
Create FLOWFILTER (ex. VTN FLOWFILTER).
curl -v --user admin:adminpass -X POST -H 'content-type: application/json' -H 'ipaddr:127.0.0.1' -d '{"flowfilter" : {"ff_type": "in"}}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/flowfilters.json

curl -v --user admin:adminpass -X POST -H 'content-type: application/json' -H 'ipaddr:127.0.0.1' -d '{"flowfilterentry": {"seqnum": "3", "fl_name": "flowlist1", "action_type": "pass", "priority": "2", "dscp": "10"}}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/flowfilters/in/flowfilterentries.json

Steps 4:
Check Flowlist entries created in VTN Manager side using GET method.

curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X GET http://10.106.138.190:8080/controller/nb/v2/vtn/default/flowconditions
OUTPUT:
{"flowcondition":[

{"name":"flowlist1"}

]}
curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X GET http://10.106.138.190:8080/controller/nb/v2/vtn/default/flowconditions/flowlist1
OUTPUT:
{"name":"flowlist1","match":[

{"index":1}

]}

Issue: From coordinator for flowlist entries only "name" is created, other attributes " seqnum", " macethertype" , " ipdstaddr" , " ipproto ", " ipdscp ", " icmptypenum ", " icmptypenum " are not created in Manager.

Step 5:
Check Flowfilter in VTN Manager side Using GET method:

curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X GET http://10.106.138.190:8080/controller/nb/v2/vtn/default/vtns/vtn_one/flowfilters

OUTPUT:
{"flowfilter":[{"index":3,"condition":"flowlist1","filterType":{"pass":{}}}]}

Issue: From coordinator for flowfilter entry “seqnum” and “fl_name” alone created, due to some issue in current code attributes like “action_type”, “priority”, “dscp”, “macdstaddr”, “macsrcaddr” are not listed in Manager.

The above is Flowfilter steps for VTN Flowfilter, same issue is reproducible for VBRFLOWFILTER, VBRIFFlowFilter, VTERMIFFLowFilter.

Work around using VTN MANAGER:
Create Flowlist entries using VTN Manager and check using GET method
Step 6:
Check Flowlist in VTN Manager using PUT and GET Method.
curl -v -X PUT -H 'content-type: application/json' --user 'admin:admin' -d '{"name": "flowlist1","match": [{"index":23,"inetMatch": {"inet4":

{"src": "10.0.0.1","dst": "10.0.0.4"}

}}]}' http://127.0.0.1:8080/controller/nb/v2/vtn/default/flowconditions/flowlist1

curl -v -X GET -H 'content-type: application/json' --user 'admin:admin' http://127.0.0.1:8080/controller/nb/v2/vtn/default/flowconditions/flowlist1/23

OUTPUT:
{"ethernet":

{"type":2048}

,"inetMatch":{"inet4":{"src":"10.0.0.1","dst":"10.0.0.4"}},"index":23}

Step7:
Create Flowfilter entries using VTN Manger and check using PUT and GET method.
curl -v -X PUT -H 'content-type: application/json' --user 'admin:admin' -d '{ "index": 3, "condition": "flowlist1", "filterType": { "pass": { } }, "actions": [ { "vlanpcp":

{ "priority": 2 }

} ] }' http://127.0.0.1:8080/controller/nb/v2/vtn/default/vtns/vtn_one/flowfilters/1

curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X GET http://10.106.138.190:8080/controller/nb/v2/vtn/default/vtns/vtn_one/flowfilters

OUTPUT:
{"flowfilter":[{"index":3,"condition":"flowlist1","filterType":{"pass":{}},"actions":[{"dscp":{"dscp":10}},{"vlanpcp":{"priority":2}}]}]}

Please follow the above flowfilter steps to create VBRIFFLOWFILTER, VBRFLOWFILTER and VTERMIFFLOWFILTER in Vtn Manager by modifying according to the keytype attirbutes

Comment by balakrishnan k [ 26/Dec/14 ]

This Bug is fixed in this patch
https://git.opendaylight.org/gerrit/#/c/13367/

Comment by Hideyuki Tai [ 05/Jan/15 ]

The patch for this bug was also merged into the stable/helium branch of the vtn.git.
https://git.opendaylight.org/gerrit/#/c/13868/

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