[pve-devel] [PATCH ha-manager 2/2] tree-wide: update description of pve-ha-node-list standard option

Daniel Kral d.kral at proxmox.com
Mon Aug 4 16:20:54 CEST 2025


The description references HA groups and is shown in the user-facing
documentation of node affinity rules, which makes it confusing. As HA
groups are deprecated now, rename the property and its uses.

Signed-off-by: Daniel Kral <d.kral at proxmox.com>
---
Also minor, but might be confusing in the future..

 src/PVE/HA/Groups.pm             |  4 ++--
 src/PVE/HA/Rules/NodeAffinity.pm |  2 +-
 src/PVE/HA/Tools.pm              | 18 +++++++++---------
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/PVE/HA/Groups.pm b/src/PVE/HA/Groups.pm
index 4bb943e5..d2802eee 100644
--- a/src/PVE/HA/Groups.pm
+++ b/src/PVE/HA/Groups.pm
@@ -19,7 +19,7 @@ my $defaultData = {
             'pve-ha-group-id',
             { completion => \&PVE::HA::Tools::complete_group },
         ),
-        nodes => get_standard_option('pve-ha-group-node-list', { optional => 1 }),
+        nodes => get_standard_option('pve-ha-node-list', { optional => 1 }),
         restricted => {
             description =>
                 "Resources bound to restricted groups may only run on nodes defined by the group.",
@@ -69,7 +69,7 @@ sub decode_value {
         my $res = {};
 
         foreach my $node (PVE::Tools::split_list($value)) {
-            if (PVE::HA::Tools::pve_verify_ha_group_node($node)) {
+            if (PVE::HA::Tools::pve_verify_ha_node($node)) {
                 $res->{$node} = 1;
             }
         }
diff --git a/src/PVE/HA/Rules/NodeAffinity.pm b/src/PVE/HA/Rules/NodeAffinity.pm
index 09a8e67c..5394832e 100644
--- a/src/PVE/HA/Rules/NodeAffinity.pm
+++ b/src/PVE/HA/Rules/NodeAffinity.pm
@@ -58,7 +58,7 @@ sub type {
 sub properties {
     return {
         nodes => get_standard_option(
-            'pve-ha-group-node-list',
+            'pve-ha-node-list',
             {
                 completion => \&PVE::Cluster::get_nodelist,
                 optional => 0,
diff --git a/src/PVE/HA/Tools.pm b/src/PVE/HA/Tools.pm
index 549cbe14..71eb5d0b 100644
--- a/src/PVE/HA/Tools.pm
+++ b/src/PVE/HA/Tools.pm
@@ -87,30 +87,30 @@ PVE::JSONSchema::register_standard_option(
     },
 );
 
-PVE::JSONSchema::register_format('pve-ha-group-node', \&pve_verify_ha_group_node);
+PVE::JSONSchema::register_format('pve-ha-node', \&pve_verify_ha_node);
 
-sub pve_verify_ha_group_node {
+sub pve_verify_ha_node {
     my ($node, $noerr) = @_;
 
     if ($node !~ m/^([a-zA-Z0-9]([a-zA-Z0-9\-]*[a-zA-Z0-9])?)(:\d+)?$/) {
         return undef if $noerr;
-        die "value does not look like a valid ha group node\n";
+        die "value does not look like a valid ha node\n";
     }
     return $node;
 }
 
 PVE::JSONSchema::register_standard_option(
-    'pve-ha-group-node-list',
+    'pve-ha-node-list',
     {
         description => "List of cluster node names with optional priority.",
         verbose_description =>
             "List of cluster node members, where a priority can be given to each"
-            . " node. A resource bound to a group will run on the available nodes with the highest"
-            . " priority. If there are more nodes in the highest priority class, the services will get"
-            . " distributed to those nodes. The priorities have a relative meaning only. The higher the"
-            . " number, the higher the priority.",
+            . " node. A resource will run on the available nodes with the highest priority. If"
+            . " there are more nodes in the highest priority class, the resources will get"
+            . " distributed to those nodes. The priorities have a relative meaning only. The"
+            . " higher the number, the higher the priority.",
         type => 'string',
-        format => 'pve-ha-group-node-list',
+        format => 'pve-ha-node-list',
         typetext => '<node>[:<pri>]{,<node>[:<pri>]}*',
     },
 );
-- 
2.47.2





More information about the pve-devel mailing list