[pve-devel] [PATCH guest-common] GuestHelpers: allow overriding $lockdir in test environments

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Jun 9 09:55:58 CEST 2017


---
 PVE/GuestHelpers.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/GuestHelpers.pm b/PVE/GuestHelpers.pm
index d066527..16e27a9 100644
--- a/PVE/GuestHelpers.pm
+++ b/PVE/GuestHelpers.pm
@@ -8,11 +8,12 @@ use PVE::Tools;
 # We use a separate lock to block migration while a replication job
 # is running.
 
+our $lockdir = '/var/lock/pve-manager';
+
 sub guest_migration_lock {
     my ($vmid, $timeout, $func, @param) = @_;
 
     my $lockid = "pve-migrate-$vmid";
-    my $lockdir = "/var/lock/pve-manager";
 
     mkdir $lockdir;
 
-- 
2.11.0





More information about the pve-devel mailing list