From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 1F1601FF146 for ; Tue, 12 May 2026 11:06:10 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 78523A958; Tue, 12 May 2026 11:06:08 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 12 May 2026 11:05:33 +0200 Message-Id: Subject: Re: [PATCH pve-manager 1/3] ui: ha: add auto-rebalance flag From: "Daniel Kral" To: "Dominik Rusovac" , X-Mailer: aerc 0.21.0-136-gdb9fe9896a79-dirty References: <20260511155734.149101-1-d.rusovac@proxmox.com> <20260511155734.149101-2-d.rusovac@proxmox.com> In-Reply-To: <20260511155734.149101-2-d.rusovac@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1778576621627 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.076 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: YZNQ2HPPR3QRKBZHH2NDHLJVA72IAR3A X-Message-ID-Hash: YZNQ2HPPR3QRKBZHH2NDHLJVA72IAR3A X-MailFrom: d.kral@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Looks good to me, a small unrelated (pre-existing) nit inline, in any way consider this as: Reviewed-by: Daniel Kral On Mon May 11, 2026 at 5:57 PM CEST, Dominik Rusovac wrote: > Adapt the implementation of the 'failback' flag for the 'auto-rebalance' > flag, which controls whether an HA resource is allowed to migrate during > automatic rebalancing. > > Signed-off-by: Dominik Rusovac > --- > www/manager6/ha/ResourceEdit.js | 14 ++++++++++++++ > www/manager6/ha/Resources.js | 6 ++++++ > www/manager6/ha/StatusView.js | 4 ++++ > 3 files changed, 24 insertions(+) > > diff --git a/www/manager6/ha/ResourceEdit.js b/www/manager6/ha/ResourceEd= it.js > index a4f53dad..487d9cf3 100644 > --- a/www/manager6/ha/ResourceEdit.js > +++ b/www/manager6/ha/ResourceEdit.js > @@ -12,6 +12,7 @@ Ext.define('PVE.ha.VMResourceInputPanel', { > delete values.vmid; > =20 > PVE.Utils.delete_if_default(values, 'failback', '1', me.isCreate= ); > + PVE.Utils.delete_if_default(values, 'auto-rebalance', '1', me.is= Create); > PVE.Utils.delete_if_default(values, 'max_restart', '1', me.isCre= ate); > PVE.Utils.delete_if_default(values, 'max_relocate', '1', me.isCr= eate); > =20 > @@ -123,6 +124,19 @@ Ext.define('PVE.ha.VMResourceInputPanel', { > uncheckedValue: 0, > value: 1, > }, > + { > + xtype: 'proxmoxcheckbox', > + name: 'auto-rebalance', > + fieldLabel: gettext('Auto-Rebalance'), > + autoEl: { > + tag: 'div', > + 'data-qtip': gettext( > + 'Enable if HA resource may be migrated during au= tomatic rebalancing.', > + ), > + }, > + uncheckedValue: 0, > + value: 1, > + }, nit: pre-existing, but maybe I think it might be nice to move the requested state to the top row (in a patch before this) as it seems more central to the HA resources than the 'failback' and new 'auto-rebalance' option. No hard feelings though for this and definitely shouldn't block this series at all. > { > xtype: 'proxmoxKVComboBox', > name: 'state', > diff --git a/www/manager6/ha/Resources.js b/www/manager6/ha/Resources.js > index 621ed336..2fda3b24 100644 > --- a/www/manager6/ha/Resources.js > +++ b/www/manager6/ha/Resources.js > @@ -150,6 +150,12 @@ Ext.define('PVE.ha.ResourcesView', { > sortable: true, > dataIndex: 'failback', > }, > + { > + header: gettext('Auto-Rebalance'), > + width: 100, > + sortable: true, > + dataIndex: 'auto-rebalance', > + }, > { > header: gettext('Description'), > flex: 1, > diff --git a/www/manager6/ha/StatusView.js b/www/manager6/ha/StatusView.j= s > index bc2da71f..59fcc6f3 100644 > --- a/www/manager6/ha/StatusView.js > +++ b/www/manager6/ha/StatusView.js > @@ -84,6 +84,10 @@ Ext.define( > name: 'failback', > type: 'boolean', > }, > + { > + name: 'auto-rebalance', > + type: 'boolean', > + }, > 'max_restart', > 'max_relocate', > 'type',