]> git.proxmox.com Git - mirror_frr.git/commit - watchfrr/watchfrr.c
watchfrr, vtysh: do not write config during crash
authorQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 20 Mar 2018 19:07:36 +0000 (15:07 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 21 Mar 2018 07:11:02 +0000 (03:11 -0400)
commit470bc6191952eb590b8157c4928190ef66fdd6ba
tree364f0692071599bb1872b28590a266daadae4583
parent18febdb05a0dc854ae0fd6657a62b95ddb795c17
watchfrr, vtysh: do not write config during crash

If a daemon is restarting, crashed, or otherwise in the process of
reconnecting to watchfrr and a user issues "write memory" or "write
file" the resulting config will not include the configuration of that
daemon. This is problematic because this output will overwrite the
previous config, potentially causing unintentional loss of configuration
stored only in the config file based upon timing.

This patch remedies that by making watchfrr check that all daemons are
up before attempting a configuration write, and updating vtysh so that
its failsafe respects this condition as well.

Note that this issue only manifests when using integrated config.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
vtysh/vtysh.c
watchfrr/watchfrr.c
watchfrr/watchfrr.h
watchfrr/watchfrr_vty.c