Fix config transaction handling in netconf. 58/4658/1
authorTomas Olvecky <tolvecky@cisco.com>
Thu, 23 Jan 2014 17:20:29 +0000 (18:20 +0100)
committerTomas Olvecky <tolvecky@cisco.com>
Thu, 23 Jan 2014 17:20:29 +0000 (18:20 +0100)
commite876a13d6da3748f303181912e19c72a149df063
treeae9fdad29eb5afd1944fcdb441317ceba2b406c5
parentd0eb6e4c6098f7f3a1366fcfd5df22c26c15c24c
Fix config transaction handling in netconf.

When config manager fails a transaction because of optimistic lock failure, netconf
must clean up this transaction as well. Fix TransactionProvider to abort transaction
if commit fails. Only exception is ValidationException where user should
have an option to fix the configuration and commit again.

Turn off netconf client reuse in persister: this narrows the possibility of
hitting concurrent modification with other config transactions. Each retry
to push a snapshot is now done with a newly obtained client, so new transaction
will be started each time.

Change-Id: I4d49fea10a682e4d7cd85ab49f2b78be63a84c02
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/transactions/TransactionProvider.java
opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPusher.java