[TSDR-15] TSDR Query output does not match RK value in some specific cases Created: 22/Jan/16  Updated: 10/Feb/16  Resolved: 10/Feb/16

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

Type: Bug
Reporter: premnath sundarababu Assignee: Sharon Aicler
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: 5052
Priority: Normal

 Description   

1) Try FLOWTABLE STATS Query with Table:0 , it returns all the Table Values

curl -G -v -X GET -H "Accept: application/json" -H "Content-Type application/json" "http://10.16.148.236:8181/tsdr/metrics/query" --data-urlencode "tsdrkey=[NID=openflow:1][DC=][MN=FLOWTABLESTATS][RK=Table:0]" --data-urlencode "from=1453384405" --data-urlencode "until=1453446951"

{
"metricName": "PacketLookup",
"metricValue": 0,
"timeStamp": "Fri Jan 22 12:44:36 IST 2016",
"nodeID": "openflow:1",
"tsdrDataCategory": "FLOWTABLESTATS",
"recordKeys": [

{ "keyName": "Node", "keyValue": "openflow:1" }

,

{ "keyName": "Table", "keyValue": "150" }

]
},
{
"metricName": "PacketLookup",
"metricValue": 0,
"timeStamp": "Fri Jan 22 12:44:51 IST 2016",
"nodeID": "openflow:1",
"tsdrDataCategory": "FLOWTABLESTATS",
"recordKeys": [

{ "keyName": "Node", "keyValue": "openflow:1" }

,

{ "keyName": "Table", "keyValue": "150" }

]
}

2) Node ID matches the prefix

curl -G -v -X GET -H "Accept: application/json" -H "Content-Type application/json" "http://10.16.148.236:8181/tsdr/metrics/query" --data-urlencode "tsdrkey=[NID=openflow:1][DC=][MN=FLOWTABLESTATS][RK=Table:0]" --data-urlencode "from=0" --data-urlencode "until=now"

Here NID is openflow:1 and it matches all nodes with 1*

<snippet output>

{
"metricName": "ActiveFlows",
"metricValue": 0,
"timeStamp": "Fri Jan 22 12:56:37 IST 2016",
"nodeID": "openflow:10",
"tsdrDataCategory": "FLOWTABLESTATS",
"recordKeys": [

{ "keyName": "Node", "keyValue": "openflow:10" }

,

{ "keyName": "Table", "keyValue": "71" }

]
},
{
"metricName": "ActiveFlows",
"metricValue": 0,
"timeStamp": "Fri Jan 22 12:56:52 IST 2016",
"nodeID": "openflow:10",
"tsdrDataCategory": "FLOWTABLESTATS",
"recordKeys": [

{ "keyName": "Node", "keyValue": "openflow:10" }

,

{ "keyName": "Table", "keyValue": "71" }

]
}



 Comments   
Comment by YuLing Chen [ 03/Feb/16 ]

A couple of patch sets merged lately should have fixed this issue.

I tested with NetFlow type of data with HBase, and here is the correct result:

yuling@yuling-Precision-Tower-5810:~/purging-check/distribution/distribution-karaf/target/assembly/data/log$ curl -G -v -H "Accept: application/json" -H "Content-Type: application/json" "http://localhost:8181/tsdr/logs/query" --data-urlencode "tsdrkey=[NID=][DC=NETFLOW][RK=portname:port2]" --data-urlencode "from=0" --data-urlencode "until=240000000"|more

  • About to connect() to localhost port 8181 (#0)
  • Trying 127.0.0.1... % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 -::- -::- -::- 0connected
    > GET /tsdr/logs/query?tsdrkey=%5BNID%3D%5D%5BDC%3DNETFLOW%5D%5BRK%3Dportname%3Aport2%5D&from=0&until=240000000 HTTP/1.1
    > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
    > Host: localhost:8181
    > Accept: application/json
    > Content-Type: application/json
    >
    < HTTP/1.1 201 Created
    < Content-Type: application/json
    < Transfer-Encoding: chunked
    < Server: Jetty(8.1.15.v20140411)
    <
    { [data not shown]
    100 1049 0 1049 0 0 92431 0 -::- -::- -::- 102k
  • Connection #0 to host localhost left intact
  • Closing connection #0
    {
    "recordCount": 3,
    "logRecords": [
    Unknown macro: { "recordFullText"}

    ,

    Unknown macro: { "recordFullText"}

    ,

    Unknown macro: { "recordFullText"}

    ]
    }

The rows in hbase table are:

hbase(main):012:0> scan 'NETFLOW'
ROW COLUMN+CELL
[NID=10.0.0.0.2][DC=NETFLOW][RK=p column=c1:RecordFullText, timestamp=1454476378958, value=This is test 1111 of NetFlow data
ortName:port1][TS=1454476378958]
[NID=10.0.0.0.2][DC=NETFLOW][RK=p column=c1:srcAddr, timestamp=1454476378958, value=10.8.8.3
ortName:port1][TS=1454476378958]
[NID=10.0.0.0.2][DC=NETFLOW][RK=p column=c1:RecordFullText, timestamp=1454477269378, value=This is test 1111 of NetFlow data
ortName:port1][TS=1454477269378]
[NID=10.0.0.0.2][DC=NETFLOW][RK=p column=c1:srcAddr, timestamp=1454477269378, value=10.8.8.3
ortName:port1][TS=1454477269378]
[NID=10.0.0.0.2][DC=NETFLOW][RK=p column=c1:RecordFullText, timestamp=1454475278469, value=This is test 2222 of NetFlow data
ortName:port2][TS=1454475278469]
[NID=10.0.0.0.2][DC=NETFLOW][RK=p column=c1:srcAddr, timestamp=1454475278469, value=10.8.8.3
ortName:port2][TS=1454475278469]
[NID=10.0.0.0.2][DC=NETFLOW][RK=p column=c1:RecordFullText, timestamp=1454476378961, value=This is test 2222 of NetFlow data
ortName:port2][TS=1454476378961]
[NID=10.0.0.0.2][DC=NETFLOW][RK=p column=c1:srcAddr, timestamp=1454476378961, value=10.8.8.3
ortName:port2][TS=1454476378961]
[NID=10.0.0.0.2][DC=NETFLOW][RK=p column=c1:RecordFullText, timestamp=1454477269381, value=This is test 2222 of NetFlow data
ortName:port2][TS=1454477269381]
[NID=10.0.0.0.2][DC=NETFLOW][RK=p column=c1:srcAddr, timestamp=1454477269381, value=10.8.8.3
ortName:port2][TS=1454477269381]
5 row(s) in 0.0300 seconds

Comment by premnath sundarababu [ 05/Feb/16 ]

Issue is still seen with Table:1 matches all tables prefixing with 1

Comment by YuLing Chen [ 08/Feb/16 ]

fixed with patch set:
https://git.opendaylight.org/gerrit/#/c/34267

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