From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 46A6D1FF185 for ; Mon, 4 Aug 2025 16:21:18 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 03119337ED; Mon, 4 Aug 2025 16:22:49 +0200 (CEST) From: Daniel Kral To: pve-devel@lists.proxmox.com Date: Mon, 4 Aug 2025 16:20:54 +0200 Message-ID: <20250804142212.212744-2-d.kral@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250804142212.212744-1-d.kral@proxmox.com> References: <20250804142212.212744-1-d.kral@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1754317317307 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.014 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 Subject: [pve-devel] [PATCH ha-manager 2/2] tree-wide: update description of pve-ha-node-list standard option X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" 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 --- 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 => '[:]{,[:]}*', }, ); -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel