controllers: evpn : use frr restart if reload fail

frr reload is not 100% perfect, and sometime is not able to
apply correctly changes.

Use restart in this case to be sure to have the correct config.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2022-02-23 08:11:43 +01:00 committed by Thomas Lamprecht
parent c5582ba30e
commit 9c24bcc5eb

View file

@ -428,7 +428,13 @@ sub reload_controller {
};
if (-e $conf_file && -e $bin_path) {
eval {
run_command([$bin_path, '--stdout', '--reload', $conf_file], outfunc => {}, errfunc => $err);
};
if ($@) {
warn "frr reload command fail. Restarting frr.";
eval { run_command(['systemctl', 'restart', 'frr']); };
}
}
}