[pve-devel] [RFC cluster] cluster: add cfs_lock_acme

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Apr 11 10:08:42 CEST 2018


to lock an ACME account config file

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 data/PVE/Cluster.pm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm
index fabf5bc..d0bf452 100644
--- a/data/PVE/Cluster.pm
+++ b/data/PVE/Cluster.pm
@@ -960,6 +960,14 @@ sub cfs_lock_domain {
     &$cfs_lock($lockid, $timeout, $code, @param);
 }
 
+sub cfs_lock_acme {
+    my ($account, $timeout, $code, @param) = @_;
+
+    my $lockid = "acme-$account";
+
+    &$cfs_lock($lockid, $timeout, $code, @param);
+}
+
 my $log_levels = {
     "emerg" => 0,
     "alert" => 1,
-- 
2.14.2





More information about the pve-devel mailing list