[pmg-devel] applied: [PATCH pmg-api] cluster: reload pmg-smtp-filter on rulechange

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Sep 9 08:04:45 CEST 2019


On 06.09.19 15:30, Stoiko Ivanov wrote:
> fix #2360.
> 
> When a node detects a change of the rule-database during clustersync, the
> database update got done, however the running `pmg-smtp-filter` instance
> was not notified of the updated ruleset. Adding a call to
> PMG::DBTools::reload_ruledb (like in the API2 paths) fixes the issue.
> 
> Tested by
> * creating a 2 node PMG cluster
> * adding and removing e-mail-addresses to the Blacklist (which was used in
>   a high priority, active rule)
> * sending e-mails from those addresses through PMG
> * observing the action taken before/after the Rule DB got synced
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
>  src/PMG/Cluster.pm | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/PMG/Cluster.pm b/src/PMG/Cluster.pm
> index 319a45b..3f055a0 100644
> --- a/src/PMG/Cluster.pm
> +++ b/src/PMG/Cluster.pm
> @@ -501,6 +501,8 @@ sub sync_ruledb_from_master {
>  	die $err;
>      }
>  
> +    PMG::DBTools::reload_ruledb();
> +
>      syslog('info', "finished rule database sync from host '$ni->{ip}'");
>  }
>  
> 

applied, with some additions to the commit message, thanks!



More information about the pmg-devel mailing list