[SFC-172] Service Functions created from GUI cause sfc_agent crash Created: 14/Nov/16  Updated: 19/Oct/17  Resolved: 29/Nov/16

Status: Resolved
Project: sfc
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Swati Deshpande 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: 7179

 Description   

If service Function is created from GUI it adds additional prefix service-function-type
for the SF type and that causes sfc_agent crash while parsing the create SF REST message.

Here are steps to reproduce the bug.
0. Build and Install boron sfc ODL controller.
git clone https://git.opendaylight.org/gerrit/p/sfc.git --branch stable/boron
1. Connect to SFC GUI, http://<odl-ip>:8181/index.html
2. build sfc package from sfc-py folder and install it on your SF node
3. Run sfc_agent on SF as 'sudo python3.4 sfc/sfc_agent.py --rest --odl-ip-port odl-controller-ip>:8181 &
4. Connect to SFC GUI, Click on Service Functions , then click on Add Service function , use default template and save SF.
5. Fetch the service function created using RESTConf
(http://<odl-controller-ip>:8181/apidoc/explorer/index.html#!/service-function(2014-07-01)/GET_service_functions_get_1)
6. You would see output something like below

{
"name": "firewall-1",
"sf-data-plane-locator": [

{ "name": "firewall-1-dpl", "ip": "172.16.9.43", "port": 6633, "service-function-forwarder": "SFF2", "transport": "service-locator:vxlan-gpe" }

],
"nsh-aware": true,
"rest-uri": "http://172.16.9.43:5000",
"ip-mgmt-address": "172.16.9.43",
"type": "service-function-type:firewall"
}

5. The type is getting set as
"type": "service-function-type:firewall"

Hence when ODL sends create SF REST message to SF, SF type gets sent as

{"type": "service-function-type:service-function-type:firewall"}

whereas sfc_agent is expecting it to be

{"type": "service-function-type:firewall"}

 Comments   
Comment by venkatamahesh kotha [ 29/Nov/16 ]

Hi,

I have reproduced your steps, I got this:
{
"service-functions": {
"service-function": [
{
"name": "SF1",
"nsh-aware": true,
"type": "firewall",
"sf-data-plane-locator": [

{ "name": "dp1", "ip": "10.0.0.1", "service-function-forwarder": "", "transport": "service-locator:vxlan-gpe" }

]
}
]
}
}

Comment by Swati Deshpande [ 29/Nov/16 ]

The fix for this bug has been merged to master .
https://git.opendaylight.org/gerrit/#/c/48398/

Comment by venkatamahesh kotha [ 29/Nov/16 ]

If it is resolved then make status as resolved and fixed

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