[NETCONF-362] Unable to open multiple transactions to a single netconf device at a time Created: 07/Mar/17 Updated: 15/Mar/19 Resolved: 01/Oct/18 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | netconf |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Highest |
| Reporter: | Michal Cmarada | Assignee: | Jakub Morvay |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Issue Links: |
|
||||||||
| External issue ID: | 7918 | ||||||||
| Description |
|
When two (or more) standalone applications write to the same netconf device different data tree at the same time one transaction will fail. : Failed to open new transaction |
| Comments |
| Comment by Jakub Morvay [ 10/Mar/17 ] |
|
Currently, netconf mountpoints provide DataBroker implementation that supports just one open write or read/write transaction at a time. Hence, when opening a second transaction, you can see this error. The reason behind this single open transaction restriction is that every transaction locks the device. Lock is released upon transaction completion. Since the device is locked for the whole transaction life time, we can be sure that no one else can change device configuration. Some possible solutions how to enable more than one open transaction: 1) Do not enable them. Netconf mountpoints do not provide DataBroker service but our own service that has this restriction documented properly. 2) Block on creating new transactions and wait until previous transaction completes. 3) Cache modifications done by multiple transactions, validate them on netconf southbound and validate them also against possible changes made concurrently on device independently from provided DataBroker. This is something we should consult with DataBroker API and most importantly with netconf RFC. |
| Comment by Robert Varga [ 13/Mar/17 ] |
|
To clarify the problem scope and trade-offs. A mount point is backed by a single NETCONF session and all transactions execute on it. Since netconf does not allow for multiple candidate stores for a particular session, we do not get any help from the RFC6241/device. Given that the candidate store may be shared across sessions, and there is no standardized way of discovering this, establishing multiple concurrent sessions may not provide a scalable solution (due to the need to lock) and may hit device connection limits. Hence we have a three-dimensional solution space to search, with no single solution being the best fit for all devices because:
Do VBD and GBP use TransactionChains? |
| Comment by Jakub Morvay [ 13/Mar/17 ] |
|
As a quick fix for this problem we can use my second solution proposal, that is: 2) Block on creating new transactions and wait until previous transaction completes. We can make this more general, by allowing to specify a timeout for blocking on creating a new transaction. After timeout, opening a new transaction will fail with a specific exception, rather than just general TimeoutException or IllegalStateExpcetion. This timeout can be specified in netconf node configuration. Also, we should document this DataBroker implementation properly, what are the restrictions and limitations to it. Since this is a quick fix and it does not really allow for multiple transactions open at a time, I also opened a milestone |
| Comment by Jakub Morvay [ 13/Mar/17 ] |
|
Sorry the milestone bug is NETCONF-370 not |
| Comment by Viera Zelcamova [ 14/Mar/17 ] |
|
Moving correctly to next service release, Carbon Sr1, the closest release, for bugfix. |
| Comment by Jakub Morvay [ 01/Oct/18 ] |
|
We should track this under NETCONF-370 (which is about mountpoint concurrent transactions in general) , closing this as a duplicate of that milestone. |