[pve-devel] [PATCH qemu-server 1/2] Fix #2816: increase timeout for allocation on restore

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Aug 11 14:36:18 CEST 2020


On August 4, 2020 1:32 pm, Fabian Ebner wrote:
> qcow2 images are allocated with --preallocation=metadata,
> which can take a while for large images.
> Avoid using 'got timeout' as an error message by itself,
> to make it clearer where a timeout occured.
> 
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
>  PVE/QemuServer.pm | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 0a09f3a..8b0b2c8 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -6261,7 +6261,7 @@ sub restore_vma_archive {
>  	    local $SIG{QUIT} =
>  	    local $SIG{HUP} =
>  	    local $SIG{PIPE} = sub { die "interrupted by signal\n"; };
> -	local $SIG{ALRM} = sub { die "got timeout\n"; };
> +	local $SIG{ALRM} = sub { die "got timeout preparing device images\n"; };
>  
>  	$oldtimeout = alarm($timeout);
>  
> @@ -6275,9 +6275,9 @@ sub restore_vma_archive {
>  		$devinfo->{$devname} = { size => $size, dev_id => $dev_id };
>  	    } elsif ($line =~ m/^CTIME: /) {
>  		# we correctly received the vma config, so we can disable
> -		# the timeout now for disk allocation (set to 10 minutes, so
> +		# the timeout now for disk allocation (set to 1 hour, so
>  		# that we always timeout if something goes wrong)

do we really need this timeout? we are by definition in a worker 
already, instead of moving the goal post once more could we not drop 
this and let the user hit 'Stop' if the allocation stalls altogether?

> -		alarm(600);
> +		alarm(60 * 60);
>  		&$print_devmap();
>  		print $fifofh "done\n";
>  		my $tmp = $oldtimeout || 0;
> -- 
> 2.20.1
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 





More information about the pve-devel mailing list