[pve-devel] applied: [PATCH manager] fix #1389: vzdump: handle storage failure in new()

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Jun 8 16:23:26 CEST 2017


applied

On Mon, May 22, 2017 at 01:16:48PM +0200, Fabian Grünbichler wrote:
> otherwise the mail notification is not triggered
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
>  PVE/VZDump.pm | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
> index 988089f..004672d 100644
> --- a/PVE/VZDump.pm
> +++ b/PVE/VZDump.pm
> @@ -581,7 +581,12 @@ sub new {
>      my $errors = '';
>  
>      if ($opts->{storage}) {
> -	my $info = storage_info ($opts->{storage});
> +	my $info;
> +	eval {
> +	    $info = storage_info ($opts->{storage});
> +	};
> +	$errors .= "could not get storage information for '$opts->{storage}': $@"
> +	    if ($@);
>  	$opts->{dumpdir} = $info->{dumpdir};
>  	$maxfiles = $info->{maxfiles} if !defined($maxfiles) && defined($info->{maxfiles});
>      } elsif ($opts->{dumpdir}) {
> -- 
> 2.1.4




More information about the pve-devel mailing list