[VTN-64] For the flowlistentries and flowfilterentries created Attribute values are overwritten during update with the updated attribute values. Created: 04/May/15  Updated: 19/Oct/17  Resolved: 26/Jun/15

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: 3109

 Description   

Issue Scenario :

During the update of the vBr flowfilterentries and flowlistentries the array is overwritten with the new values,
The array just gives the updated attribute and its value

Reproduce the Bug :

First configure the vBr flowfilters as per the commands given below:

Controller :

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

Vtn :

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

VBRIDGE:

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

Flow Lists and FLowlistentries :

curl -v --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 -v --user admin:adminpass -H 'content-type: application/json' -X POST -d '{"flowlistentry": {"seqnum": "11","macethertype": "0x800","ipdstaddr": "10.0.0.3","ipdstaddrprefix": "32","ipsrcaddr": "10.0.0.1","ipsrcaddrprefix": "32","ipproto": "1","ipdscp": "17","icmptypenum": "20","icmpcodenum":"20"}}' http://127.0.0.1:8083/vtn-webapi/flowlists/flowlist1/flowlistentries.json

vBr flowfilters and flowfitlerentries:

curl -v --user admin:adminpass -X POST -H 'content-type: application/json' -d '{"flowfilter" : {"ff_type": "in"}}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/vbridges/vbr_one/flowfilters.json

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

Then Update the Flowlistentries and flowfilterenties using the below commands:

curl -v --user admin:adminpass -H 'content-type: application/json' -X PUT -d '{"flowlistentry": {"seqnum": "11","macethertype": "0x800","ipdstaddr": "10.0.0.3","ipdstaddrprefix": "32","ipsrcaddr": "10.0.0.1","ipsrcaddrprefix": "32","ipproto": "1","ipdscp": "16","icmptypenum": "20","icmpcodenum":"20"}}' http://127.0.0.1:8083/vtn-webapi/flowlists/flowlist1/flowlistentries/11.json

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

When the GET command is used in the Vtn manager to get the Flowconditions and flowfilterentries:

curl -v --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X GET http://localhost:8282/controller/nb/v2/vtn/default/flowconditions

Result:

{"flowcondition":[{"name":"flowlist1","match":[{"ethernet":

{"type":"2048"}

,"inetMatch":{"inet4":{"dscp":"16"}},"index":"11"}]}]}

curl -v --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X GET http://localhost:8282/controller/nb/v2/vtn/default/vtns/vtn_one/vbridges/vbr_one/flowfilters/in/1

Result:

{"index":"1","condition":"flowlist1","filterType":{"pass":{}},"actions":[{"dscp":{"dscp":"50"}}]}

Occurrence of the issue :

For all the keytypes of flowlistentries or the flowfilterentries during update operation, the updated attribute alone is being overwritten on the whole array.



 Comments   
Comment by YOGA LAKSHMI SWETHA PAYYAVULA [ 24/Jun/15 ]

This Bug is fixed in the below given patch:

https://git.opendaylight.org/gerrit/20360

Comment by YOGA LAKSHMI SWETHA PAYYAVULA [ 26/Jun/15 ]

This Bug was filed in the Lithium Release.

Please find below the link for the patch in Master Branch :
https://git.opendaylight.org/gerrit/#/c/20360/

Please find below the link for the patch in the stable/Lithium Branch:
https://git.opendaylight.org/gerrit/#/c/20377/1

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