Am 06.03.24 um 11:47 schrieb Hannes Duerr:
> @@ -3820,7 +3821,13 @@ __PACKAGE__->register_method({
>  
>               if ($target) {
>                   # always deactivate volumes - avoid lvm LVs to be active on 
> several nodes
> -                 PVE::Storage::deactivate_volumes($storecfg, $vollist, 
> $snapname) if !$running;
> +                 eval {
> +                     PVE::Storage::deactivate_volumes($storecfg, $vollist, 
> $snapname) if !$running;
> +                 };
> +                 my $err = $@;
> +                 if ($err) {
> +                     log_warn("$err\n");
> +                 }
>                   PVE::Storage::deactivate_volumes($storecfg, $newvollist);

We might also want to catch errors here. Otherwise, the whole clone
operation (which might've taken hours) can still fail just because of a
deactivation error. But when failing here, we shouldn't move the config
file (or the LV can get active on multiple nodes more easily). Can be a
separate patch or the same (since it's still about demoting deactivation
failure, would still fit logically).

>  
>                   my $newconffile = PVE::QemuConfig->config_file($newid, 
> $target);


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to