summaryrefslogtreecommitdiff
path: root/lib/northbound.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-12-07 15:27:34 -0200
committerRenato Westphal <renato@opensourcerouting.org>2018-12-07 16:01:34 -0200
commit88a7d121d1cd8d65db0179be019508bcbcdd266e (patch)
tree34ee68c1f61d4567571b35e64eb8079ceaa75d8d /lib/northbound.h
parentac92680d8ddba0ab3ddf3099b22b75cc81e50ffa (diff)
lib: fix NETCONF network-wide transactions for confd and sysrepo
ConfD and Sysrepo implement configuration transactions using a two-phase commit protocol (prepare + abort/apply). For network-wide transactions to work, ConfD and Sysrepo move to the second phase of the commit protocol only after receiving the results of the first phase from all devices involved in the transaction. If all devices succeed in the 'prepare' phase, then all of them move to the 'apply' phase and the transaction is committed. On the other hand, if any device fails in the 'prepare' phase, all of them move to 'abort' phase and the transaction is aborted. The confd and sysrepo plugins were implementing the full two-phase commit protocol upon receiving a request to validate the configuration changes and allocate all resources required to apply them (first phase). The notifications to abort or apply the changes (second phase) were being ignored since everything was being done in the first phase for simplicity. This wasn't a problem for single-device transactions, but it is for transactions involving multiple devices. Rework the code a bit to do things properly and fix this problem. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/northbound.h')
0 files changed, 0 insertions, 0 deletions