[OPNFLWPLUG-491] NPE while restconf flow update Created: 08/Jun/15  Updated: 27/Sep/21  Resolved: 15/Jun/15

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

Type: Bug
Reporter: Peter Gubka Assignee: Jozef Gloncak
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Attachments: Text File karaf.log     Zip Archive karaf.log.He.zip     Zip Archive karaf.log.li.zip    
External issue ID: 3616
Priority: High

 Description   

odl: Lithium RC0

features: odl-openflowplugin-flow-services-ui (He design plugin)
or
features: odl-openflowplugin-flow-services-ui-li (Li design plugin)

i have run suites from integration git as
pybot -v CONTROLLER:10.25.2.9 -v MININET:127.0.0.1 -v MININET_USER:mininet -v USER_HOME:/home/mininet -v RESTCONFPORT:8181 tools/OF_Test/robot_suites/998_Independent_OF_Tests_ovs/020_Flow_Data_Tests.txt csit/suites/openflowplugin/Flows_OF13 csit/suites/openflowplugin/Flows_Stats_OF13 csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended

running just suite csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended does not replicate the case and test are passing

updating the flow in config datastore returns http status 400 with {"errors":{"error":[

{"error-type":"protocol","error-tag":"malformed-message","error-message":"Error parsing input: Content is not allowed in prolog."}

]}}

He designed ofp:

2015-06-08 08:48:00,964 | WARN | tp2108625922-608 | ServletHandler | 208 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | /restconf/operations/sal-flow:update-flow
java.lang.NullPointerException
at org.opendaylight.openflowplugin.openflow.md.core.sal.OFRpcTaskFactory$2OFRpcTaskImpl.<init>(OFRpcTaskFactory.java:320)
at org.opendaylight.openflowplugin.openflow.md.core.sal.OFRpcTaskFactory.createUpdateFlowTask(OFRpcTaskFactory.java:414)
at org.opendaylight.openflowplugin.openflow.md.core.sal.ModelDrivenSwitchImpl.updateFlow(ModelDrivenSwitchImpl.java:230)

Li designed ofp:

2015-06-08 09:04:01,719 | ERROR | entLoopGroup-6-2 | ExecutionList | 61 - com.google.guava - 18.0.0 | RuntimeException while executing runnable com.google.common.util.concurrent.Futures$6@112f6844 with executor INSTANCE
java.lang.NullPointerException
at org.opendaylight.openflowplugin.impl.services.SalFlowServiceImpl$3.onSuccess(SalFlowServiceImpl.java:157)[195:org.opendaylight.openflowplugin.impl:0.1.0.Lithium-RC0]
at org.opendaylight.openflowplugin.impl.services.SalFlowServiceImpl$3.onSuccess(SalFlowServiceImpl.java:151)[195:org.opendaylight.openflowplugin.impl:0.1.0.Lithium-RC0]
at com.google.common.util.concurrent.Futures$6.run(Futures.java:1319)[61:com.google.guava:18.0.0]
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457)[61:com.google.guava:18.0.0]



 Comments   
Comment by Peter Gubka [ 08/Jun/15 ]

Attachment karaf.log.li.zip has been added with description: Li karaf.log

Comment by Peter Gubka [ 08/Jun/15 ]

Attachment karaf.log.He.zip has been added with description: He karaf log

Comment by Jozef Gloncak [ 08/Jun/15 ]

It looks like this problem (He part) has been already discovered under OPNFLWPLUG-487.
It has been merged yet.

I am going to fix Li part.

Comment by Jozef Gloncak [ 08/Jun/15 ]

This should solve problem in Li
https://git.opendaylight.org/gerrit/22090

I am going to test it a s Peter described earlier.

Comment by Jozef Gloncak [ 08/Jun/15 ]

tar file was sent to Peter Gubka for testing

Comment by Peter Gubka [ 09/Jun/15 ]

(In reply to Jozef Gloncak from comment #4)
> tar file was sent to Peter Gubka for testing

File tested, looks like the issue is not fixed. Feedback given to Jozef.

Comment by Jozef Gloncak [ 09/Jun/15 ]

I created:

  • reference output.xml (1) for tests specified below from rc0 build
  • build OF distribution with patch under CONTROLLER-1362
  • run below mentioned tests (result was output.xml (2))

Both outputs (1) and (2) passed equally (it means which passed in 1 also passed in 2 and which didn't passed in 1 also didn't passed in 2).

Conclusion: after merging patch from CONTROLLER-1362, problem reported in this bug should disappear.

Comment by Michal Rehak [ 10/Jun/15 ]

merged

Comment by Jozef Gloncak [ 10/Jun/15 ]

After merge of patch from CONTROLLER-1362 this problem is no more observed in Li. In He I wasn't able to run tests.

Comment by Peter Gubka [ 11/Jun/15 ]

With a new odl the wrong behaviour is still present in Li designed ofp (http status 400 is returned).
But there is nothing interesting in the log (in attachment)

Comment by Peter Gubka [ 11/Jun/15 ]

Attachment karaf.log has been added with description: Li karaf log June 11

Comment by Jozef Gloncak [ 11/Jun/15 ]

Peter specified 4 test suites:
– tools/OF_Test/robot_suites/998_Independent_OF_Tests_ovs/020_Flow_Data_Tests.txt
– csit/suites/openflowplugin/Flows_OF13
– csit/suites/openflowplugin/Flows_Stats_OF13
– csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended

If this suites are executed in this order then last one (Stat_Manager_extended) contains almost 50 failing tests.

Common problem is that PUT operation is unsuccessfull and server returns
PUT response: {"errors":{"error":[

{"error-type":"protocol","error-tag":"malformed-message","error-message":"Error parsing input: Content is not allowed in prolog."}

]}}.

If last suite is executed as first this problem isn't observed!!!!!

I debugged this problem and I found out that input which is read from file is in format (just snippet)
"<?xml version=\"1.0\" encoding=\"utf-8\"?><flow xmlns=\"urn:opendaylight:flow:inventory\">\n <strict>false</strict>\n <instructions>\n <instruction>\n <order>0</order>\n <apply-actions>\n <action>\n

This input can't be parsed because of leading quotation mark and wrong escaping of characters (new line, quotation mark).

Currently I have no idea what can be cause of this behaviour but it looks like problem is somewhere in tests.

Comment by Peter Gubka [ 15/Jun/15 ]

tests updated, it happened because 2 different robot libraries had the same name

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