public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: David Riley <d.riley@proxmox.com>
To: Jakob Klocker <j.klocker@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH pve-guest-common v2 1/8] AbstractConfig: fix pending delete for options with value 0
Date: Wed, 11 Nov 2026 17:20:41 +0100	[thread overview]
Message-ID: <fd3fbec5-a534-4041-beaa-d6c20f0afdbb@proxmox.com> (raw)
In-Reply-To: <20261022125111.236538-2-j.klocker@proxmox.com>

Consider this:
Reviewed-by: David Riley <d.riley@proxmox.com>

On 10/22/26 2:51 PM, Jakob Klocker wrote:
> When building the merged runtime configuration (`load_current_config`),
> pending deletions check `if $conf->{$opt}` before clearing keys. Because
> a value of `0` evaluates to false in Perl, the condition fails and the
> key is left in the merged view.
>
> While the final configuration application on restart still clears the
> key, this causes UI desynchronization during the pending state (e.g., UI
> components see the old `0` value and misrender). Using `defined` ensures
> the merged view correctly reflects pending deletions immediately.
>
> Signed-off-by: Jakob Klocker<j.klocker@proxmox.com>
> ---
>   src/PVE/AbstractConfig.pm | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/PVE/AbstractConfig.pm b/src/PVE/AbstractConfig.pm
> index 7bcae19..a708ced 100644
> --- a/src/PVE/AbstractConfig.pm
> +++ b/src/PVE/AbstractConfig.pm
> @@ -242,7 +242,7 @@ sub load_current_config {
>           }
>           my $pending_delete_hash = $class->parse_pending_delete($conf->{pending}->{delete});
>           foreach my $opt (keys %$pending_delete_hash) {
> -            delete $conf->{$opt} if $conf->{$opt};
> +            delete $conf->{$opt} if defined $conf->{$opt};
>           }
>       }
>   




  reply	other threads:[~2026-11-11 16:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 12:51 [PATCH docs/guest-common/manager/qemu-server v2 0/8] fix #7213: add `powercycle` reboot behavior Jakob Klocker
2026-10-22 12:51 ` [PATCH pve-guest-common v2 1/8] AbstractConfig: fix pending delete for options with value 0 Jakob Klocker
2026-11-11 16:20   ` David Riley [this message]
2026-10-22 12:51 ` [PATCH pve-docs v2 2/8] qm: add reboot behavior information Jakob Klocker
2026-11-11 16:21   ` David Riley
2026-10-22 12:51 ` [PATCH qemu-server v2 3/8] qm: do not restart VM when `reboot` is disabled Jakob Klocker
2026-10-22 12:51 ` [PATCH qemu-server v2 4/8] fix #7213: config: add `powercycle` sub-property to `reboot` Jakob Klocker
2026-11-11 16:21   ` David Riley
2026-10-22 12:51 ` [PATCH qemu-server v2 5/8] fix #7213: qm: cleanup: add `reset` parameter to honor `powercycle` Jakob Klocker
2026-10-22 12:51 ` [PATCH qemu-server v2 6/8] fix #7213: qmeventd: pass `reset` to `qm cleanup` Jakob Klocker
2026-10-22 12:51 ` [PATCH qemu-server v2 7/8] vm_reboot: warn when rebooting a VM with `reboot` disabled Jakob Klocker
2026-10-22 12:51 ` [PATCH pve-manager v2 8/8] ui: qemu: options: add editor for reboot behavior Jakob Klocker
2026-11-11 16:22   ` David Riley
2026-11-11 16:20 ` [PATCH docs/guest-common/manager/qemu-server v2 0/8] fix #7213: add `powercycle` " David Riley

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=fd3fbec5-a534-4041-beaa-d6c20f0afdbb@proxmox.com \
    --to=d.riley@proxmox.com \
    --cc=j.klocker@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal