As noted by Donald:
When FRR is starting all daemons (or restarting them all) FRR is reading
in the configuration 1 time for each daemon specified to run. This is
not a big deal if you have a very small configuration. But with large
configurations FRR is taking long enough that watchfrr is not
establishing connection to all the daemons and starting some over.
Modify the code so that vtysh is only read in at the end of a all
sequence. If we are restarting an individual daemon allow the read in of
the whole config.
Reported-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: David Lamparter <equinox@diac24.net>
daemon_start() {
local dmninst daemon inst args instopt wrap bin
+
+ all=false
+ [ "$1" = "--all" ] && { all=true; shift; }
+
daemon_inst "$1"
ulimit -n $MAX_FDS > /dev/null 2> /dev/null
if eval "$all_wrap $wrap $bin $nsopt -d $frr_global_options $instopt $args"; then
log_success_msg "Started $dmninst"
- vtysh_b "$daemon"
+ if $all; then
+ debug "Skipping startup of vtysh until all have started"
+ else
+ vtysh_b "$daemon"
+ fi
else
log_failure_msg "Failed to start $dmninst!"
fi
all_start() {
daemon_list daemons
for dmninst in $daemons; do
- daemon_start "$dmninst"
+ daemon_start --all "$dmninst"
done
+ vtysh_b
}
all_stop() {