Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- alternatively we could re-use 'cfs_lock_domain', which is currently only used by HA and was intended as general-purpose cfs_lock wrapper.. I'd shorten the firewall- prefix to fw- in that case though.
domain-fw-host-$foo might be more confusing to end users though, as it's pretty visible in error messages. data/PVE/Cluster.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm index 068d626..b4de989 100644 --- a/data/PVE/Cluster.pm +++ b/data/PVE/Cluster.pm @@ -659,6 +659,14 @@ sub cfs_lock_authkey { $cfs_lock->('authkey', $timeout, $code, @param); } +sub cfs_lock_firewall { + my ($scope, $timeout, $code, @param) = @_; + + my $lockid = "firewall-$scope"; + + $cfs_lock->($lockid, $timeout, $code, @param); +} + my $log_levels = { "emerg" => 0, "alert" => 1, -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel