[pve-devel] [PATCH] improve free_image with deactivate_volumes

Dietmar Maurer dietmar at proxmox.com
Wed Sep 9 06:55:02 CEST 2015



On 09/08/2015 12:23 PM, Wolfgang Link wrote:
> this is necessary to pervent aa error by trying to remove a mapped volume.
please correct spelling errors
> ---
>   PVE/Storage/RBDPlugin.pm | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
> index 329fd23..feb8bfc 100644
> --- a/PVE/Storage/RBDPlugin.pm
> +++ b/PVE/Storage/RBDPlugin.pm
> @@ -407,6 +407,10 @@ sub free_image {
>   	}
>       }
>   
> +    eval {
> +	$class->deactivate_volume($storeid, $scfg, $volname);
> +    };
why do you silently skip errors here?
> +
>       my $cmd = &$rbd_cmd($scfg, $storeid, 'snap', 'purge',  $name);
>       run_rbd_command($cmd, errmsg => "rbd snap purge '$volname' error");
>   





More information about the pve-devel mailing list