From: Daniel Kral <d.kral@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager v5 1/3] ui: ha: rules: add ha resource affinity rules
Date: Wed, 30 Jul 2025 20:14:20 +0200 [thread overview]
Message-ID: <20250730181428.392906-17-d.kral@proxmox.com> (raw)
In-Reply-To: <20250730181428.392906-1-d.kral@proxmox.com>
Add HA resource affinity rules as a second rule type to the HA Rules'
tab page as a separate grid so that the columns match the content of
these rules better.
Signed-off-by: Daniel Kral <d.kral@proxmox.com>
---
www/manager6/Makefile | 2 ++
www/manager6/ha/Rules.js | 12 +++++++
.../ha/rules/ResourceAffinityRuleEdit.js | 24 ++++++++++++++
.../ha/rules/ResourceAffinityRules.js | 31 +++++++++++++++++++
4 files changed, 69 insertions(+)
create mode 100644 www/manager6/ha/rules/ResourceAffinityRuleEdit.js
create mode 100644 www/manager6/ha/rules/ResourceAffinityRules.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 9bea169a..60971956 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -152,6 +152,8 @@ JSSRC= \
ha/StatusView.js \
ha/rules/NodeAffinityRuleEdit.js \
ha/rules/NodeAffinityRules.js \
+ ha/rules/ResourceAffinityRuleEdit.js \
+ ha/rules/ResourceAffinityRules.js \
dc/ACLView.js \
dc/ACMEClusterView.js \
dc/AuthEditBase.js \
diff --git a/www/manager6/ha/Rules.js b/www/manager6/ha/Rules.js
index 8f487465..1799d25f 100644
--- a/www/manager6/ha/Rules.js
+++ b/www/manager6/ha/Rules.js
@@ -167,6 +167,17 @@ Ext.define(
flex: 1,
border: 0,
},
+ {
+ xtype: 'splitter',
+ collapsible: false,
+ performCollapse: false,
+ },
+ {
+ title: gettext('HA Resource Affinity Rules'),
+ xtype: 'pveHAResourceAffinityRulesView',
+ flex: 1,
+ border: 0,
+ },
],
},
function () {
@@ -180,6 +191,7 @@ Ext.define(
'errors',
'disable',
'comment',
+ 'affinity',
'resources',
{
name: 'strict',
diff --git a/www/manager6/ha/rules/ResourceAffinityRuleEdit.js b/www/manager6/ha/rules/ResourceAffinityRuleEdit.js
new file mode 100644
index 00000000..3bfb2c49
--- /dev/null
+++ b/www/manager6/ha/rules/ResourceAffinityRuleEdit.js
@@ -0,0 +1,24 @@
+Ext.define('PVE.ha.rules.ResourceAffinityInputPanel', {
+ extend: 'PVE.ha.RuleInputPanel',
+
+ initComponent: function () {
+ let me = this;
+
+ me.column1 = [];
+
+ me.column2 = [
+ {
+ xtype: 'proxmoxKVComboBox',
+ name: 'affinity',
+ fieldLabel: gettext('Affinity'),
+ allowBlank: false,
+ comboItems: [
+ ['positive', gettext('Keep together')],
+ ['negative', gettext('Keep separate')],
+ ],
+ },
+ ];
+
+ me.callParent();
+ },
+});
diff --git a/www/manager6/ha/rules/ResourceAffinityRules.js b/www/manager6/ha/rules/ResourceAffinityRules.js
new file mode 100644
index 00000000..6205881e
--- /dev/null
+++ b/www/manager6/ha/rules/ResourceAffinityRules.js
@@ -0,0 +1,31 @@
+Ext.define('PVE.ha.ResourceAffinityRulesView', {
+ extend: 'PVE.ha.RulesBaseView',
+ alias: 'widget.pveHAResourceAffinityRulesView',
+
+ ruleType: 'resource-affinity',
+ ruleTitle: gettext('HA Resource Affinity'),
+ inputPanel: 'ResourceAffinityInputPanel',
+ faIcon: 'link',
+
+ stateful: true,
+ stateId: 'grid-ha-resource-affinity-rules',
+
+ initComponent: function () {
+ let me = this;
+
+ me.columns = [
+ {
+ header: gettext('Affinity'),
+ width: 100,
+ dataIndex: 'affinity',
+ },
+ {
+ header: gettext('HA Resources'),
+ flex: 1,
+ dataIndex: 'resources',
+ },
+ ];
+
+ me.callParent();
+ },
+});
--
2.47.2
_______________________________________________
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:[~2025-07-30 18:15 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-30 18:14 [pve-devel] [PATCH container/docs/ha-manager/manager/qemu-server v5 00/20] HA " Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 01/14] introduce PVE::HA::HashTools module Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 02/14] rules: introduce plugin-specific canonicalize routines Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 03/14] rules: add haenv node list to the rules' canonicalization stage Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 04/14] rules: introduce resource affinity rule plugin Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 05/14] rules: add global checks between node and resource affinity rules Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 06/14] usage: add information about a service's assigned nodes Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 07/14] manager: apply resource affinity rules when selecting service nodes Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 08/14] manager: handle resource affinity rules in manual migrations Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 09/14] sim: resources: add option to limit start and migrate tries to node Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 10/14] test: ha tester: add test cases for negative resource affinity rules Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 11/14] test: ha tester: add test cases for positive " Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 12/14] test: ha tester: add test cases for static scheduler resource affinity Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 13/14] test: rules: add test cases for resource affinity rules Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH ha-manager v5 14/14] api: resources: add check for resource affinity in resource migrations Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH docs v5 1/1] ha: add documentation about ha resource affinity rules Daniel Kral
2025-08-04 13:00 ` Hannes Duerr
2025-07-30 18:14 ` Daniel Kral [this message]
2025-07-30 18:14 ` [pve-devel] [PATCH manager v5 2/3] ui: migrate: lxc: display precondition messages for ha resource affinity Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH manager v5 3/3] ui: migrate: vm: " Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH container v5 1/1] api: introduce migration preconditions api endpoint Daniel Kral
2025-07-30 18:14 ` [pve-devel] [PATCH qemu-server v5 1/1] api: migration preconditions: add checks for ha resource affinity rules Daniel Kral
2025-08-04 9:50 ` [pve-devel] applied-series: [PATCH container/docs/ha-manager/manager/qemu-server v5 00/20] HA " Fiona Ebner
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=20250730181428.392906-17-d.kral@proxmox.com \
--to=d.kral@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