]> git.proxmox.com Git - mirror_frr.git/commit - lib/northbound_confd.c
lib: add API to allow northbound clients to lock/unlock the running configuration
authorRenato Westphal <renato@opensourcerouting.org>
Sat, 2 Feb 2019 20:03:15 +0000 (18:03 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Fri, 26 Apr 2019 21:04:22 +0000 (18:04 -0300)
commit364ad673c885d741d575e97dbae70bf6d7c8f36e
treeb971e555c4c651502e1e3caae9b0d1d85c42c6ba
parent86336f620f6e175e5552085877fa02ffaf9591b1
lib: add API to allow northbound clients to lock/unlock the running configuration

The ability to lock the running configuration to prevent other users
from changing it is a very important one. We already supported
the "configure exclusive" command but the lock was applied to
the CLI users only (other clients like ConfD could still commit
configuration transactions, ignoring the CLI lock). This commit
introduces a global lock for the running configuration that is
shared by all northbound clients, and provides a public API to
manipulate it. This way other northbound clients will also be able
to lock/unlock the running configuration if required (the upcoming
gRPC northbound plugin will have RPCs for that).

NOTE: this is a management-level lock for the running configuration,
not to be confused with low-level locks used to avoid data races.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lib/northbound.c
lib/northbound.h
lib/northbound_cli.c
lib/northbound_confd.c
lib/northbound_sysrepo.c
lib/vty.c
lib/vty.h