[TSDR-16] Error is returned when trying to set or get TSDR related configs Created: 24/Jan/16  Updated: 22/Mar/18  Resolved: 22/Mar/18

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

Type: Bug
Reporter: premnath sundarababu Assignee: Razi Ahmed
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: PNG File Polling-Interval-URL.png     HTML File PollingIntervalGet     PNG File bug 5068 feature install.png     PNG File bug 5068-openflow-stats-setpollinginterval.png     PNG File bug 5068-snmp-interval-retrieval.png     PNG File bug-5068-openflow-stats-interval-retrieval.png     PNG File bug-5068-snmp-setPollingInterval.png    
External issue ID: 5068
Priority: High

 Description   

Error when trying to setPollingInterval .

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 Not Found</title>
</head>
<body>
<h2>HTTP ERROR: 404</h2>
<p>Problem accessing /operations/tsdr-snmp-data-collector:setPollingInterval. Reason:
<pre> Not Found</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>

/operations/tsdr-snmp-data-collector:setPollingInterval

{
"input":

{ "interval": "15000" }

}

/restconf/config/tsdr-openflow-statistics-collector:TSDRDCConfig

Query Output:

{"errors":{"error":[

{"error-type":"protocol","error-tag":"invalid-value","error-message":"URI has bad format. Possible reasons:\n 1. \"tsdr-openflow-statistics-collector:TSDRDCConfig\" was not found in parent data node.\n 2. \"tsdr-openflow-statistics-collector:TSDRDCConfig\" is behind mount point. Then it should be in format \"/yang-ext:mount/tsdr-openflow-statistics-collector:TSDRDCConfig\"."}

]}}



 Comments   
Comment by Razi Ahmed [ 27/Jan/16 ]

Attachment Polling-Interval-URL.png has been added with description: Screen shots to check polling interval

Comment by Razi Ahmed [ 27/Jan/16 ]

The URL /operations/tsdr-snmp-data-collector:setPollingInterval is used when we are setting Polling Interval through MD-SAL Apidocs.

To set polling interval using Restconf, the URL for same is:
http://localhost:8181/restconf/operations/tsdr-snmp-data-collector:setPollingInterval

Steps using ApiDocs:
1. feature:install odl-mdsal-all
2. Use method POST with URL: /operations/tsdr-snmp-data-collector:setPollingInterval under module
tsdr-snmp-data-collector(2015-10-13)
3. Use input:
{"input" :

{ "interval" : "3000" }

}

Steps using RestConf:
1. feature:install odl-restconf-all
2. Use POST method with URL : http://localhost:8181/restconf/operations/tsdr-snmp-data-collector:setPollingInterval
3. Set Content-Type: application/json in Headers.
4. Use input:
{"input" :

{ "interval" : "3000" }

}

I am able to successfully set polling interval using above steps respectively for Apidocs and Restconf. You can check screen shot to set polling interval using Restconf above.

Comment by Razi Ahmed [ 01/Feb/16 ]

To get the polling interval, the correct URL for SNMP Data Collector is:

http://localhost:8181/restconf/config/tsdr-snmp-data-collector:TSDRSnmpDataCollectorConfig/

Comment by premnath sundarababu [ 05/Feb/16 ]

SNMP polling worked fine.
Need help in getting this working.

/restconf/config/tsdr-openflow-statistics-collector:TSDRDCConfig

Query Output:

{"errors":{"error":[

{"error-type":"protocol","error-tag":"invalid-value","error-message":"URI has bad format. Possible reasons:\n 1. \"tsdr-openflow-statistics-collector:TSDRDCConfig\" was not found in parent data node.\n 2. \"tsdr-openflow-statistics-collector:TSDRDCConfig\" is behind mount point. Then it should be in format \"/yang-ext:mount/tsdr-openflow-statistics-collector:TSDRDCConfig\"."}

]}}

Comment by YuLing Chen [ 06/Feb/16 ]

In my testing environment, I got setPollingInterval working in both snmp and openflowstats collector case. The problem is with the retrieval of the polling interval.

Here I attach the screenshot.

Razi/Trapti, could you test snmp polling interval case and attach screen shot as what you did for setPollingInterval?

Thanks,

YuLing

Comment by YuLing Chen [ 08/Feb/16 ]

Attachment PollingIntervalGet has been added with description: Error when retrieving the polling interval from snmp collector

Comment by YuLing Chen [ 08/Feb/16 ]

Attachment TSDR-16 feature install.png has been added with description: feature install screenshot

Comment by YuLing Chen [ 08/Feb/16 ]

Today in my testing environment, I was able to both set and retrieve the polling interval from both snmp and openflow stas collector.

The following are URLs for both snmp and OF stats collector:
http://localhost:8181/restconf/operations/tsdr-snmp-data-collector:setPollingInterval
http://localhost:8181/restconf/operations/tsdr-openflow-statistics-collector:setPollingInterval
http://localhost:8181/restconf/config/tsdr-snmp-data-collector:TSDRSnmpDataCollectorConfig
http://localhost:8181/restconf/config/tsdr-openflow-statistics-collector:TSDROSCConfig

Comment by YuLing Chen [ 08/Feb/16 ]

Attachment TSDR-16-snmp-interval-retrieval.png has been added with description: snmp collector polling interval retrieval from restconf

Comment by YuLing Chen [ 08/Feb/16 ]

Attachment bug-5068-openflow-stats-interval-retrieval.png has been added with description: OF stats polling interval retrieval through restconf

Comment by YuLing Chen [ 08/Feb/16 ]

Attachment TSDR-16-openflow-stats-setpollinginterval.png has been added with description: OF stats setPolling interval through restconf

Comment by YuLing Chen [ 08/Feb/16 ]

Attachment bug-5068-snmp-setPollingInterval.png has been added with description: SNMP collector setPollingInterval

Comment by YuLing Chen [ 08/Feb/16 ]

Premnath, when you verify this bug, you might want to see if it could be the timing issue. As you know, when you install OFStats collector and SNMP Collector from karaf console, even when the command returns, you would still need to wait for some time until all the modules are installed and initialized. If you trigger the restconf commands quickly after those collectors are installed, you might hit errors.

Comment by Razi Ahmed [ 09/Feb/16 ]

Premnath, to check retrieval of polling interval of OF stats , you have to install feature for that:
feature:install odl-tsdr-openflow-statistics-collector

Comment by premnath sundarababu [ 10/Feb/16 ]

Get is working only after setting it atleast once in OpenFlow.
But this can be release noted as its not a major issue

Comment by Razi Ahmed [ 11/Feb/16 ]

This issue is coming because we are not writing the hard coded polling interval to the data store. We have to call saveConfigData() method after setting polling interval.

The changes have been tested and merged and this issue no longer persists.

Comment by YuLing Chen [ 11/Feb/16 ]

fixed by patch set:https://git.opendaylight.org/gerrit/#/c/34433/

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