[NETCONF-724] Making NETCONF chunk aggregator more robust Created: 12/Sep/20 Updated: 07/Sep/23 |
|
| Status: | In Review |
| Project: | netconf |
| Component/s: | netconf |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Jaroslav Tóth | Assignee: | Jaroslav Tóth |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Currently, if an error occurs during composition of NETCONF chunks into NETCONF RPC replies (for example, written number of chunk bytes is not correct), some exception is thrown. However, this exception is never handled on NETCONF layer using NETTY's exceptionCaught(..) handler method (for example, in the last processing bit of NETCONF channel pipeline - AbstractNetconfSession or derived class). It results in:
Possible solutions:
Motivation: IOS XR 6.1.2/6.6.x seems to be buggy - after sending get-config request on path to Operational datastore it sometimes inserts RPC errors into response but these RPC errors are not counted in chunk size. This happens more often when get RPC is invoked on data that has a lot of lines (measured in thousands). For example: <get> <filter xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:type="subtree"> <cfg-hist-gl xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-config-cfgmgr-exec-oper"> <record-type> <record-type>commit</record-type> </record-type> </cfg-hist-gl> </filter> </get> RPC error is inserted randomly between chunks: ... <rpc-error><error-type>transport</error-type> <error-tag>resource-denied</error-tag><error-message>transport throttling error</error-message></rpc-error> #462 <record> <record>1395</record> <timestamp>1578037903</timestamp> ... And error message from NetconfChunkAggregator: Got byte 60 while waiting for 10 |