tools: do not silently ignore errors when loading config during startup

Drop the `-n` (`--noerror`) flag from the `vtysh -b` invocation called by the
init script responsible for starting FRR. This ensures that errors in the
configuration file is propagated to the administrator, and prevents a node from
entering a production network while running an essentially undefined
configuration (a behaviour that I can personally attest to has the potential to
cause disastrous network outages - documented in more detail in Cumulus
Networks CS#12791).

Silently ignoring errors also leads to the rather odd behaviour that starting
FRR will ostensibly succeed, while reloading it immediately after - without
changing the configuration - will fail. This is due to the fact that the `-n`
flag is not used while reloading.

The use of the `-n` flag appears to have been introduced without any
explanation in commit 858aa29c68 by @donaldsharp.
Looking at the commit message, I suspect that it was not an intentional change.
It seems more likely to me that it was just meant to be used during testing and
development, but ended up being committed to master by accident.

Ticket:CM-28003

Signed-off-by: Tore Anderson <tore@fud.no>
This commit is contained in:
Tore Anderson 2020-07-22 17:32:18 +02:00
parent 9d9adc84c7
commit e220f954de
No known key found for this signature in database
GPG Key ID: 2D362EA9A1F53DBB
2 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ vtysh_b ()
{
# Rember, that all variables have been incremented by 1 in convert_daemon_prios()
if [ "$vtysh_enable" = 2 -a -f $C_PATH/frr.conf ]; then
$VTYSH -b -n
$VTYSH -b
fi
}

View File

@ -65,9 +65,9 @@ vtysh_b () {
[ "$1" = "watchfrr" ] && return 0
[ -r "$C_PATH/frr.conf" ] || return 0
if [ -n "$1" ]; then
"$VTYSH" `echo $nsopt` -b -n -d "$1"
"$VTYSH" `echo $nsopt` -b -d "$1"
else
"$VTYSH" `echo $nsopt` -b -n
"$VTYSH" `echo $nsopt` -b
fi
}