all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-network] controllers: evpn : use frr restart if reload fail
@ 2022-02-23  7:11 Alexandre Derumier
  2022-02-24 12:41 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Derumier @ 2022-02-23  7:11 UTC (permalink / raw)
  To: pve-devel

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>
---
 PVE/Network/SDN/Controllers/EvpnPlugin.pm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/PVE/Network/SDN/Controllers/EvpnPlugin.pm
index 70a9da1..0c49893 100644
--- a/PVE/Network/SDN/Controllers/EvpnPlugin.pm
+++ b/PVE/Network/SDN/Controllers/EvpnPlugin.pm
@@ -428,7 +428,13 @@ sub reload_controller {
     };
 
     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']); };
+	}
     }
 }
 
-- 
2.30.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH pve-network] controllers: evpn : use frr restart if reload fail
  2022-02-23  7:11 [pve-devel] [PATCH pve-network] controllers: evpn : use frr restart if reload fail Alexandre Derumier
@ 2022-02-24 12:41 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2022-02-24 12:41 UTC (permalink / raw)
  To: Proxmox VE development discussion, Alexandre Derumier

On 23.02.22 08:11, Alexandre Derumier wrote:
> 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>
> ---
>  PVE/Network/SDN/Controllers/EvpnPlugin.pm | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-24 12:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23  7:11 [pve-devel] [PATCH pve-network] controllers: evpn : use frr restart if reload fail Alexandre Derumier
2022-02-24 12:41 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal