forked from Mirror/pve-network
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:
parent
c5582ba30e
commit
9c24bcc5eb
|
@ -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']); };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue