From: "Michael Köppl" <m.koeppl@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 1/1] fix: ha: set ha-managed param default and unchecked value to undefined
Date: Mon, 17 Nov 2025 14:18:15 +0100 [thread overview]
Message-ID: <20251117131815.123469-1-m.koeppl@proxmox.com> (raw)
This avoids sending the parameter with the default value when it's not
necessary, since the API already defines the param as optional and
assigns a default value of 0.
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
Thanks to @Friedrich for bringing this to my attention. A case where
this occurs is in clusters where at least one of the nodes does not yet
support the ha-managed param and a VM is created on that node from the
web UI of a node that already supports it. Although in general it can
probably be expected that all nodes should be upgraded to a new version,
this avoids failing the CreateWizard dialog entirely for cases where the
"Add to HA" checkbox wasn't even checked at basically no cost because
the API already defines a default value of 0 and considers the param
optional.
www/manager6/lxc/CreateWizard.js | 4 ++--
www/manager6/qemu/CreateWizard.js | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/www/manager6/lxc/CreateWizard.js b/www/manager6/lxc/CreateWizard.js
index f35709f14..024536c58 100644
--- a/www/manager6/lxc/CreateWizard.js
+++ b/www/manager6/lxc/CreateWizard.js
@@ -85,8 +85,8 @@ Ext.define('PVE.lxc.CreateWizard', {
{
xtype: 'proxmoxcheckbox',
name: 'ha-managed',
- uncheckedValue: 0,
- defaultValue: 0,
+ uncheckedValue: undefined,
+ defaultValue: undefined,
fieldLabel: gettext('Add to HA'),
},
],
diff --git a/www/manager6/qemu/CreateWizard.js b/www/manager6/qemu/CreateWizard.js
index e0c56bc0b..564ca1176 100644
--- a/www/manager6/qemu/CreateWizard.js
+++ b/www/manager6/qemu/CreateWizard.js
@@ -99,8 +99,8 @@ Ext.define('PVE.qemu.CreateWizard', {
{
xtype: 'proxmoxcheckbox',
name: 'ha-managed',
- uncheckedValue: 0,
- defaultValue: 0,
+ uncheckedValue: undefined,
+ defaultValue: undefined,
fieldLabel: gettext('Add to HA'),
},
],
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-11-17 13:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 13:18 Michael Köppl [this message]
2025-11-17 16:47 ` Thomas Lamprecht
2025-11-17 17:35 ` Michael Köppl
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=20251117131815.123469-1-m.koeppl@proxmox.com \
--to=m.koeppl@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