[pve-devel] [PATCH v2 qemu-server 3/7] restore deactivate volumes: never die

Fabian Ebner f.ebner at proxmox.com
Mon Apr 25 08:45:05 CEST 2022


Am 23.04.22 um 11:18 schrieb Thomas Lamprecht:
> On 21.04.22 13:26, Fabian Ebner wrote:
>> Such an error shouldn't abort the whole operation.
>>
>> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
>> ---
>>
>> No changes from v1.
>>
>>  PVE/QemuServer.pm | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
>> index be0694f9..9a16b617 100644
>> --- a/PVE/QemuServer.pm
>> +++ b/PVE/QemuServer.pm
>> @@ -6460,7 +6460,8 @@ my $restore_deactivate_volumes = sub {
>>  	push @$vollist, $volid if $volid;
>>      }
>>  
>> -    PVE::Storage::deactivate_volumes($storecfg, $vollist);
>> +    eval { PVE::Storage::deactivate_volumes($storecfg, $vollist); };
>> +    print STDERR $@ if $@;
> 
> why not use warn "$@" which normally also gets printed on stderr?
>

I kept it in line with how restore_destroy_volumes does it, but I can
change it in v3.

>>  };
>>  
>>  my $restore_destroy_volumes = sub {
> 





More information about the pve-devel mailing list