[CONTROLLER-317] NETCONF client fails to detect commit failure Created: 14/Apr/14  Updated: 25/Jul/23  Resolved: 05/Aug/14

Status: Resolved
Project: controller
Component/s: netconf
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Giles Heron Assignee: Maros Marsalek
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
blocks CONTROLLER-211 List mounted yang modules Resolved
blocks CONTROLLER-222 Unable to invoke RPC on NE using moun... Resolved
blocks CONTROLLER-290 Milestone: config and netconf bugfixing Resolved
blocks CONTROLLER-432 RESTConf API Explorer: Generate URLs ... Resolved
is blocked by CONTROLLER-512 Migrate sal-netconf-connector to use ... Resolved

 Description   

When configuring a router using RESTCONF to NETCONF ODL does the following on the router:

1) get-config
2) edit-config
3) commit

if the RESTCONF API user attempts e.g. to apply a non-existent ACL to an interface then the commit will fail. However ODL fails to detect this. As far as I know the router is returning a failure code to ODL.

The problem we then have is that the NETCONF session now has outstanding incorrect configs which have not been rolled back. So any future RESTCONF PUTs will fail - even if they are valid.

even with "TRACE" logging on the netconf client all I see on the commit is:

2014-04-14 10:00:31.866 BST [http-bio-8080-exec-6] DEBUG o.o.c.s.c.n.NetconfDevice#xrvr-a - Send message <rpc message-id="m-11" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<commit/>
</rpc>

2014-04-14 10:00:31.866 BST [http-bio-8080-exec-6] DEBUG o.o.c.n.c.SimpleNetconfClientSessionListener - Sending message org.opendaylight.controller.netconf.api.NetconfMessage@154555a0
2014-04-14 10:00:31.892 BST [nettyThreadgroupModule$NioEventLoopGroupCloseable-9-1] DEBUG o.o.c.n.c.SimpleNetconfClientSessionListener - New message arrived: org.opendaylight.controller.netconf.api.NetconfMessage@7af88648
2014-04-14 10:00:31.892 BST [http-bio-8080-exec-6] DEBUG o.o.c.netconf.client.NetconfClient - Total time spent waiting for response from i2ss-yuma1.cisco.com/172.23.29.116:830: 26 ms



 Comments   
Comment by Giles Heron [ 16/Apr/14 ]

I think the solution needs to be that ODL does:

1) lock
2) get-config
3) edit-config
4) commit
5) rollback (if commit failed)
6) unlock

does that make sense?

at any rate ODL needs to check the return codes at each step of this process.

Also we need a way to return a "not OK" return code over the RESTCONF and Java APIs if any of the NETCONF operations fails.

Comment by Maros Marsalek [ 17/Apr/14 ]

I have started working on this issue. But I could not get it done yet.

I have discovered a few bugs in sal-netconf-connector (fixed a few here https://git.opendaylight.org/gerrit/#/c/6234/) but there is still some kind of synchronization problem when downloading schemas from remote device.

Also before I can support "commit fail detection" I need to do:

  • perform some refactoring,
  • remove xtend dependencies and xtend code
  • write some unit test

So this wont be supported in the next few days, my next working day is on 22.4.2014

Comment by Maros Marsalek [ 17/Apr/14 ]

https://git.opendaylight.org/gerrit/#/c/6234/ - Fix monitoring capability detection
https://git.opendaylight.org/gerrit/#/c/6253/ - Fix deadlock when downloading yang schemas from remote device

Comment by Devin Avery [ 02/May/14 ]

Note gerrit 6253 introduced a concurrency bug. Please see that gerrit ticket for details.

Comment by Devin Avery [ 02/May/14 ]

CONTROLLER-447 created for concurrency issues.

Comment by Maros Marsalek [ 23/May/14 ]

Still waiting for 832

Comment by Maros Marsalek [ 15/Jul/14 ]

Waiting for 1083 to remove deprecated APIs. After that, rollback can be implemented in the netconf-connector.

Comment by Maros Marsalek [ 30/Jul/14 ]

https://git.opendaylight.org/gerrit/#/c/9471/

Generated at Wed Feb 07 19:52:44 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.