[VTN-113] Vlanmap create failed when configured with logical port-id Created: 09/Feb/16  Updated: 19/Oct/17  Resolved: 12/Feb/16

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

Type: Bug
Reporter: Karthik Sivasamy 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: 5279

 Description   

Got error when I tested VTN Coordinator FT for Vlanmap functionality with Stable/be code.

Reproduce the Bug:

To run vtn_vbr_vlanmap.py FT script:

Configuration in the above script:
1) CReate vtn, vbr
2) Create Vlanmap with logical-portid [Returns Internal server Error'500'].

Reason:
While checking odcdriver logs, in vlanmap request body node is filled as node:"1" instead of node:"openflow:1". It may be a bug.

Please find log below.

2016-02-09 20:56:20.411776: [16355]: DEBUG: vtndrvintf: 18,keytype
2016-02-09 20:56:20.411784: [16355]: DEBUG: odcdriver: UNC_KT_VBR_VLANMAP key type received
2016-02-09 20:56:20.411790: [16355]: DEBUG: vtndrvintf: keytype:18, config_operation:1
2016-02-09 20:56:20.411796: [16355]: DEBUG: vtndrvintf: execute_cmd: Translate Create Command string
2016-02-09 20:56:20.411807: [16355]: DEBUG: odcdriver: create_update_cmd: Logical_port_id is valid
2016-02-09 20:56:20.411815: [16355]: DEBUG: odcdriver: validate_logical_port_id: Logical port received : SW-openflow:1
2016-02-09 20:56:20.411821: [16355]: INFO: odcdriver: switch_base:openflow
2016-02-09 20:56:20.411827: [16355]: DEBUG: odcdriver: Switch id in vlan map openflow:1
2016-02-09 20:56:20.411833: [16355]: DEBUG: odcdriver: Valid logical_port id
2016-02-09 20:56:20.411838: [16355]: DEBUG: odcdriver: Logical port id received SW-openflow:1
2016-02-09 20:56:20.411849: [16355]: DEBUG: odcdriver: Logical port id received SW-openflow:1
2016-02-09 20:56:20.411861: [16355]: DEBUG: odcdriver: create_request_body: Vlan Tagged
2016-02-09 20:56:20.411880: [16355]: DEBUG: odcdriver: create_request_body: Vlanid: 10
2016-02-09 20:56:20.411887: [16355]: INFO: odcdriver: vlan not empty : 10
2016-02-09 20:56:20.411893: [16355]: DEBUG: odcdriver: Logical port id received SW-openflow:1
2016-02-09 20:56:20.411902: [16355]: DEBUG: odcdriver: create_request_body: Logical_port_id(SW-openflow:1)
2016-02-09 20:56:20.411909: [16355]: DEBUG: odcdriver: create_request_body: Switch id(1)
2016-02-09 20:56:20.411934: [16355]: DEBUG: restjsonutil: User name and password is taken from controller pointer
2016-02-09 20:56:20.411975: [16355]: DEBUG: restjsonutil: http://10.106.138.124:8181/restconf/operations/vtn-vlan-map:add-vlan-map Url formed
2016-02-09 20:56:20.411984: [16355]: DEBUG: restjsonutil: HTTP_METHOD_POST
2016-02-09 20:56:20.411994: [16355]: DEBUG: restjsonutil: Request Body : { "input":

{ "tenant-name": "vtnone", "bridge-name": "vbrone", "node": "1", "vlan-id": "10 " }

}
2016-02-09 20:56:20.412000: [16355]: INFO: restjsonutil: requestbody : { "input":

{ "tenant-name": "vtnone", "bridge-name": "vbrone", "node": "1", "vlan-id": "10" }

}
2016-02-09 20:56:20.421895: [16355]: DEBUG: restjsonutil: Allocates Memory ............
2016-02-09 20:56:20.422488: [16355]: ERROR: odcdriver: post is not success , resp_code 400
2016-02-09 20:56:20.422572: [16355]: ERROR: odcdriver: Vlan create/update Failed
2016-02-09 20:56:20.422587: [16355]: DEBUG: vtndrvintf: deleted config_cmd_ptr
2016-02-09 20:56:20.422675: [16355]: DEBUG: vtndrvintf: 18,execute_cmd not success
2016-02-09 20:56:20.422698: [16355]: DEBUG: tclib: TcLibWriteControllerInfo 450 Write controller info involved for controller_id controller1



 Comments   
Comment by YOGA LAKSHMI SWETHA PAYYAVULA [ 12/Feb/16 ]

The Response:

curl -v -X POST -H 'content-type: application/json' -H 'username: admin' -H 'password: adminpass' -d '{"vlanmap" : {"logical_port_id":"SW-openflow:3", "vlan_id": 200 }}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn1/vbridges/vBridge1/vlanmaps.json

  • About to connect() to 127.0.0.1 port 8083 (#0)
  • Trying 127.0.0.1... connected
  • Connected to 127.0.0.1 (127.0.0.1) port 8083 (#0)
    > POST /vtn-webapi/vtns/vtn1/vbridges/vBridge1/vlanmaps.json HTTP/1.1
    > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
    > Host: 127.0.0.1:8083
    > Accept: /
    > content-type: application/json
    > username: admin
    > password: adminpass
    > Content-Length: 66
    >
    < HTTP/1.1 201 Created
    < Server: Apache-Coyote/1.1
    < Content-Type: application/json;charset=UTF-8
    < Content-Length: 79
    < Date: Fri, 12 Feb 2016 12:08:04 GMT
    <
  • Connection #0 to host 127.0.0.1 left intact
  • Closing connection #0
Comment by YOGA LAKSHMI SWETHA PAYYAVULA [ 12/Feb/16 ]

PFB the patch details for this bug in

stable/beryllium:

https://git.opendaylight.org/gerrit/#/c/34374/

Master:

https://git.opendaylight.org/gerrit/#/c/34452/

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