[pve-devel] applied: [PATCH pve-manager] api2: network reload: add frr config generation and reload

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Sep 6 10:57:01 CEST 2019


On 04.09.19 07:54, Alexandre Derumier wrote:
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>  PVE/API2/Network.pm | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm
> index 07c3e6d3..d50a808d 100644
> --- a/PVE/API2/Network.pm
> +++ b/PVE/API2/Network.pm
> @@ -561,8 +561,10 @@ __PACKAGE__->register_method({
>  	    rename($new_config_file, $current_config_file) if -e $new_config_file;
>  
>  	    if ($have_sdn) {
> -		my $rawconfig = PVE::Network::SDN::generate_etc_network_config();
> -		PVE::Network::SDN::write_etc_network_config($rawconfig);
> +		my $network_config = PVE::Network::SDN::generate_etc_network_config();
> +		PVE::Network::SDN::write_etc_network_config($network_config);
> +		my $frr_config = PVE::Network::SDN::generate_frr_config();
> +		PVE::Network::SDN::write_frr_config($frr_config) if $frr_config;
>  	    }
>  
>  	    my $cmd = ['ifreload', '-a'];
> @@ -575,6 +577,7 @@ __PACKAGE__->register_method({
>  	    };
>  
>  	    PVE::Tools::run_command($cmd,errfunc => $err);
> +	    PVE::Tools::run_command(['systemctl', 'reload', 'frr']) if -e "/usr/lib/frr/frr-reload.py";
>  	};
>  	return $rpcenv->fork_worker('srvreload', 'networking', $authuser, $worker);
>     }});
> 


applied, thanks!




More information about the pve-devel mailing list