From: Fiona Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Hannes Duerr <h.duerr@proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server 1/1] fix 1734: clone VM: if deactivation fails demote error to warning
Date: Wed, 6 Mar 2024 13:40:12 +0100 [thread overview]
Message-ID: <1f999e2b-7ada-4978-9f40-27481a81bd3b@proxmox.com> (raw)
In-Reply-To: <20240306104703.115366-1-h.duerr@proxmox.com>
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);
next prev parent reply other threads:[~2024-03-06 12:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 10:47 Hannes Duerr
2024-03-06 11:37 ` Friedrich Weber
2024-03-06 12:31 ` Fiona Ebner
2024-03-06 12:40 ` Fiona Ebner [this message]
2024-03-06 13:14 ` Friedrich Weber
2024-03-06 14:04 ` Fiona Ebner
2024-03-06 14:19 ` Hannes Dürr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1f999e2b-7ada-4978-9f40-27481a81bd3b@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=h.duerr@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox