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 4D5B51FF14C for ; Fri, 15 May 2026 11:25:24 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 29D4C13775; Fri, 15 May 2026 11:25:24 +0200 (CEST) From: Dominik Rusovac To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v3 1/2] ui: ha: add auto-rebalance flag Date: Fri, 15 May 2026 11:25:15 +0200 Message-ID: <20260515092516.2146402-2-d.rusovac@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260515092516.2146402-1-d.rusovac@proxmox.com> References: <20260515092516.2146402-1-d.rusovac@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1778837114086 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.330 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: XHKWP3W72WLENKFBTEOQHNJOKMQP64Z4 X-Message-ID-Hash: XHKWP3W72WLENKFBTEOQHNJOKMQP64Z4 X-MailFrom: d.rusovac@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: 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 --- Notes: no changes since v2 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/ResourceEdit.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; PVE.Utils.delete_if_default(values, 'failback', '1', me.isCreate); + PVE.Utils.delete_if_default(values, 'auto-rebalance', '1', me.isCreate); PVE.Utils.delete_if_default(values, 'max_restart', '1', me.isCreate); PVE.Utils.delete_if_default(values, 'max_relocate', '1', me.isCreate); @@ -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 automatic rebalancing.', + ), + }, + uncheckedValue: 0, + value: 1, + }, { 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.js 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', -- 2.47.3