[pve-devel] [PATCH qemu-server 1/1] fix 1734: clone VM: if deactivation fails demote error to warning
Fiona Ebner
f.ebner at proxmox.com
Wed Mar 6 13:40:12 CET 2024
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);
More information about the pve-devel
mailing list