[OPNFLWPLUG-33] Not able to read GroupStats from Operational data Created: 17/Jan/14  Updated: 27/Sep/21  Resolved: 26/Jan/14

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

Type: Bug
Reporter: Tushar Goyal Assignee: Michal Rehak
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Issue Links:
Blocks
is blocked by YANGTOOLS-75 key from ListSchemaNode has different... Resolved
External issue ID: 317

 Description   

The augmentation FlowCapableNode does not contain the Group details present in the switch. All other Stats are present in the augmentation(Meter,Flow).

The Group Array is showing as empty.

I am receiving the GroupStats and it is correctly storing the Stats in the Operational datastore.

Reading from the same is the issue.



 Comments   
Comment by Prasanna Huddar [ 17/Jan/14 ]

<html><head><title>Apache Tomcat/7.0.32 - Error report</title><style><!--H1

{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}

H2

{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}

H3

{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}

BODY

{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}

B

{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}

P

{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}

A

{color : black;}

A.name

{color : black;}

HR

{color : #525D76;}

--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>java.lang.IllegalArgumentException
com.google.common.base.Preconditions.checkArgument(Preconditions.java:76)
org.opendaylight.controller.sal.restconf.impl.ControllerContext.addKeyValue(ControllerContext.java:682)
org.opendaylight.controller.sal.restconf.impl.ControllerContext.collectPathArguments(ControllerContext.java:596)
org.opendaylight.controller.sal.restconf.impl.ControllerContext.collectPathArguments(ControllerContext.java:612)
org.opendaylight.controller.sal.restconf.impl.ControllerContext.collectPathArguments(ControllerContext.java:612)
org.opendaylight.controller.sal.restconf.impl.ControllerContext.toInstanceIdentifier(ControllerContext.java:160)
org.opendaylight.controller.sal.restconf.impl.RestconfImpl.resolveInstanceIdentifier(RestconfImpl.java:384)
org.opendaylight.controller.sal.restconf.impl.RestconfImpl.readData(RestconfImpl.java:165)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:440)
org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:179)
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/7.0.32 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.32</h3></body></html>

Comment by Ed Warnicke [ 17/Jan/14 ]

Anil, could you check the statisticsmanager code to see if there is an issue there?

Comment by Anil Vishnoi [ 19/Jan/14 ]

Hi Ed/Tushar,

I manually added group to the switch and i can see the group stats when i access the node details using following restconf uri:

http://localhost:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/

<group
xmlns="urn:opendaylight:group:types">
<group-desc
xmlns="urn:opendaylight:group:statistics">
<group-type>group-select</group-type>
<buckets>
<bucket>
<action>
<output-action>
<max-length>0</max-length>
<output-node-connector>1</output-node-connector>
</output-action>
<order>0</order>
</action>
<weight>10</weight>
<bucket-id>0</bucket-id>
<watch_group>4294967295</watch_group>
<watch_port>4294967295</watch_port>
</bucket>
</buckets>
<group-id>2</group-id>
</group-desc>
<group-id>2</group-id>
<group-statistics
xmlns="urn:opendaylight:group:statistics">
<byte-count>0</byte-count>
<duration>
<nanosecond>988000</nanosecond>
<second>1390150039</second>
</duration>
<buckets>
<bucket-counter>
<byte-count>0</byte-count>
<bucket-id>0</bucket-id>
<packet-count>0</packet-count>
</bucket-counter>
</buckets>
<packet-count>0</packet-count>
<ref-count>0</ref-count>
<group-id>2</group-id>
</group-statistics>
</group>

But when i tried to access this specific group using its id(2)

http://localhost:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/group/2

i get the exception which prasanna pasted above.

I looked at the yang models and statistics manager code, but didn't find any obvious issue.

Can we get someone from restconf team to have a quick look at it and see why restconf is throwing this exception?

Probably that's the reason tushar is not able to fetch list of groups programmatically.

Thanks
Anil

Comment by Anil Vishnoi [ 20/Jan/14 ]

I had chat with Martin Sunal, and it seems to be bug in Yangtools.

Martin will open new bug and mark this bug as a dependent on the new one.

Comment by Martin Sunal [ 20/Jan/14 ]

there is a YANGTOOLS-75 which has to be resolved in yangtools.

Comment by Tushar Goyal [ 24/Jan/14 ]

Still the group are not received while testing using the CommmandProvider.

Using REST, I am able to get specific group level Stats.

The command line commands for testing the groupStats are checked-in in OpenflowpluginStatsCommandProvider.java

Methods: _groupStats
_groupDescStats

Comment by Michal Rehak [ 25/Jan/14 ]

Retested:

  • group can be added via osgi command "addGroup openflow:1"
  • group can be then removed via osgi command "removeGroup openflow:1"
  • on cpqd switch this group can be seen via comand "sudo dpctl unix:/tmp/s1 stats-group"
  • group item can be deleted via rest
  • group item CAN NOT be inserted into config datastore via rest

Tony is working on including patched bundle into master.

Comment by Michal Rehak [ 26/Jan/14 ]

Fixed by
https://git.opendaylight.org/gerrit/#/c/4801/

Reason: group delete request must NOT contain buckets definition (OF-1.3.2::6.5 Group Table Modification Messages)

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