From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server] api2: fix vmconfig_apply_pending errors handling
Date: Tue, 06 Jul 2021 10:10:23 +0200 [thread overview]
Message-ID: <1625558731.pqpqnm9nzg.astroid@nora.none> (raw)
In-Reply-To: <20210705220230.518658-1-aderumier@odiso.com>
On July 6, 2021 12:02 am, Alexandre Derumier wrote:
> commit
> https://git.proxmox.com/?p=qemu-server.git;a=commit;h=eb5e482ded9ae6aeb6575de9441b79b90a5de531
>
> have introduced error handling for offline pending apply,
>
> - PVE::QemuServer::vmconfig_apply_pending($vmid, $conf, $storecfg, $running);
> + PVE::QemuServer::vmconfig_apply_pending($vmid, $conf, $storecfg, $running, $errors);
>
> sub vmconfig_apply_pending {
> - my ($vmid, $conf, $storecfg) = @_;
> + my ($vmid, $conf, $storecfg, $errors) = @_;
>
> but they was wrong nonused $running param, so currently $errors are not correctly handled
$running was indeed not used since the introduction of hotplug
functionality in 2015 - but this also means that half of that commit was
not actually tested (@Oguz - please take another look and confirm it
works as expected WITH this patch here).
errors should still be handled "correctly" without this patch (as in,
mostly not ;)), the main difference is whether changing the config
returns a proper error or not when applying pending changes fails.
>
> Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
> ---
> PVE/API2/Qemu.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index 1e540f5..f2557e3 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -1413,7 +1413,7 @@ my $update_vm_api = sub {
> if ($running) {
> PVE::QemuServer::vmconfig_hotplug_pending($vmid, $conf, $storecfg, $modified, $errors);
> } else {
> - PVE::QemuServer::vmconfig_apply_pending($vmid, $conf, $storecfg, $running, $errors);
> + PVE::QemuServer::vmconfig_apply_pending($vmid, $conf, $storecfg, $errors);
> }
> raise_param_exc($errors) if scalar(keys %$errors);
>
> --
> 2.20.1
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
next prev parent reply other threads:[~2021-07-06 8:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-05 22:02 Alexandre Derumier
2021-07-06 8:10 ` Fabian Grünbichler [this message]
2021-07-06 9:44 ` Oguz Bektas
2021-07-06 10:44 ` [pve-devel] applied: " Thomas Lamprecht
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=1625558731.pqpqnm9nzg.astroid@nora.none \
--to=f.gruenbichler@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.