mirror of
https://git.proxmox.com/git/pve-network
synced 2025-07-27 05:59:58 +00:00
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) {
|
if (-e $conf_file && -e $bin_path) {
|
||||||
run_command([$bin_path, '--stdout', '--reload', $conf_file], outfunc => {}, errfunc => $err);
|
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 New Issue
Block a user