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

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Jun 9 10:51:18 CEST 2017


On Fri, Jun 09, 2017 at 09:55:58AM +0200, Wolfgang Bumiller wrote:
> ---
>  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";

could we rename this? it's in pve-guest-common, not pve-manager..
"pve-guests"?

>  
>      mkdir $lockdir;
>  
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list