Uploaded image for project: 'vtn'
  1. vtn
  2. VTN-126

Issue in flowfilter Import/Audit in delete and create operation when controller in DOWN state

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • unspecified
    • None
    • ODC Driver
    • None
    • Operating System: All
      Platform: All

    • 5530

    Description

      Issue : Issue arises when there is flowfilter created for a given vnode with multiple sequence numbers and one of them is deleted when controller is in DOWN state, or deleted in the Controller.

      Reproduce the scenario:

      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": "in"}}' 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/in/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 different sequence number 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": "230", "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 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/in/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 flowfilter is fetched in coordinator:
      curl -v --user admin:adminpass -X GET -H 'content-type: application/json' http://127.0.0.1:8083/vtn-webapi/vtns/vtn_one/vbridges/vbr_two/interfaces/if1/flowfilters/in/flowfilterentries.json

      • About to connect() to 127.0.0.1 port 8083 (#0)
      • Trying 127.0.0.1...
      • Connected to 127.0.0.1 (127.0.0.1) port 8083 (#0)
      • Server auth using Basic with user 'admin'
        > GET /vtn-webapi/vtns/vtn_one/vbridges/vbr_two/interfaces/if1/flowfilters/in/flowfilterentries.json HTTP/1.1
        > Authorization: Basic YWRtaW46YWRtaW5wYXNz
        > User-Agent: curl/7.29.0
        > Host: 127.0.0.1:8083
        > Accept: /
        > content-type: application/json
        >
        < HTTP/1.1 200 OK
        < Server: Apache-Coyote/1.1
        < Content-Type: application/json;charset=UTF-8
        < Content-Length: 57
        < Date: Tue, 15 Mar 2016 17:36:13 GMT
        <
      • Connection #0 to host 127.0.0.1 left intact
        Unknown macro: {"flowfilterentries"}

        [root@localhost coordinator]#

      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":230,"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":{}},{"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":{}},{"index":231,"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]#

      The flowfilter for Interface if2 with sequence number 233 is not deleted in the vtn manager.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            yogalakshmi.pa@hcl.com YOGA LAKSHMI SWETHA PAYYAVULA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: