[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
Platform: All


Issue Links:
Duplicate
duplicates NETCONF-370 Milestone: Implement DataBroker API f... Confirmed
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.
The problem that we encountered is:
Two standalone applications (VBD and GBP) are writing data to the same node but different data tree at the same time. Since Netconf is not capable to handle concurrent transactions from more sources to the same device at once, one of the transaction will fail with an exception:
2017-03-03 15:17:05,041 | ERROR | CommitFutures-4 | NetconfProxyDOMTransaction | 311 - org.opendaylight.netconf.topology-singleton - 1.2.0.SNAPSHOT | RemoteDevice

{overcloud-controller-0.opnfv.org}

: Failed to open new transaction
java.lang.IllegalStateException: Transaction is already opened for another user



 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:

  • having more than one session if there are no active applications is a waste both controller and device resources
  • multiple sessions in case of shared candidate store is wasteful
  • transactions have a logical order which must be preserved (i.e. DOMTransactionChain concrept)
  • establishing a session is slow and may fail

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 ODLPARENT-77 where we can continue to track this multiple transactions open issue (and also other related issues).

Comment by Jakub Morvay [ 13/Mar/17 ]

Sorry the milestone bug is NETCONF-370 not ODLPARENT-77

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.

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