[OPNFLWPLUG-39] Remove SW2 property "description" to a node - not working for both OF13 and OF10 mininet Created: 21/Jan/14  Updated: 27/Sep/21  Due: 25/Jan/14  Resolved: 04/Feb/14

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

Type: Improvement
Reporter: Madhusudhan Ananderi Assignee: Sheena goyal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows
Platform: PC



 Description   

Hello,

While testing NSF with new plugin, I am able to create description to a node i.e., PUT http://127.0.0.1:8080/controller/nb/v2/switchmanager/default/node/MD_SAL/openflow:2/property/description/Switch2 and verified too at http://127.0.0.1:8080/controller/nb/v2/switchmanager/default/nodes

When I try to remove the description i.e DELETE http://10.125.136.52:8080/controller/nb/v2/switchmanager/default/node/OF/00:00:00:00:00:00:00:02/property/description, I am getting 500 internal error.

Please let me know if you do get the same response. If that is so, please fix the same accordingly.

This test case is working with old plugin.

Thanks,
Madhusudhan



 Comments   
Comment by Ed Warnicke [ 21/Jan/14 ]

Is this being done against the new OFplugin or the old OFplugin?

Comment by Madhusudhan Ananderi [ 21/Jan/14 ]

This has been tested against new OFplugin with OF13 option in the mininet

Comment by Madhusudhan Ananderi [ 22/Jan/14 ]

This is tested againt new plugin -OF13 and applies for both OF13 & OF10 mininet

Comment by Madhusudhan Ananderi [ 23/Jan/14 ]

Hello,

Additional findings:

This test-case is passed for the first time (applies to both OF10 & OF13 mininet) only if you download the fresh plugin and run this test case.

For the second time, this test case is getting failed and gives 500 response code till you download the fresh plugin again.

This applies to both OF10 and OF13 mininet.

-Madhusudhan

Comment by Madhusudhan Ananderi [ 24/Jan/14 ]

Here is the error that I try to DELETE the description.

PUT http://10.125.136.52:8080/controller/nb/v2/switchmanager/default/node/MD_SAL/openflow:2/property/description/Switch2

DELETE http://10.125.136.52:8080/controller/nb/v2/switchmanager/default/node/MD_SAL/openflow:2/property/description

Response:-

<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.NullPointerException
org.opendaylight.controller.switchmanager.internal.SwitchManager.updateNodeConfig(SwitchManager.java:886)
org.opendaylight.controller.switchmanager.northbound.SwitchNorthbound.deleteNodeProperty(SwitchNorthbound.java:388)
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$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
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.ResourceClassRule.accept(ResourceClassRule.java:108)
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.handleSimpleCORS(CorsFilter.java:303)
org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:171)
</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>

When you try to send DELETE request one more time, it says "Switch configuration doesn't exists", still I could see the description in the node.

Use GET http://10.125.136.52:8080/controller/nb/v2/switchmanager/default/nodes .... to verify the description

Comment by Krishnan Iyer [ 24/Jan/14 ]

Gaurav,
Also all actions (or set fields) fails when there are multiple actions.
We are changing the XMLS and CLI commands to take only 1 action for now.

Comment by Krishnan Iyer [ 24/Jan/14 ]

Please disregard the previous comment. I apologize.

Comment by Krishnan Iyer [ 24/Jan/14 ]

Comment #7 was posted by mistake (ENTER saved my chat statement). Disregard the comment please.

Comment by Sheena goyal [ 25/Jan/14 ]

Observation 1: Whenever I install new plugin, for the first time I am not getting this error, later I start getting this issue.

Observation 2: Whenever I try to debug this from eclipse, the issue is getting reproduced once out of 10 time which makes the debugging very difficult for this issue.

Following are my debugging observations till now:

This error is getting triggered from the following function:

status = switchManager.updateNodeConfig(newSwitchConfig);

The exception gets triggered from the line 886 inside updateNodeConfig function:

if (!advertisedDesc.isEmpty()) {

which is set to "" from the line 824

String advertisedDesc = (nodeDesc == null) ? "" : nodeDesc.getDescription();

I am still not able to get what is the issue? I will be debugging this further on monday IST. If someone has any inputs to share on this please update.

Comment by Sheena goyal [ 29/Jan/14 ]

I have fixed this bug.
For reference :https://git.opendaylight.org/gerrit/#/c/4978/

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