* [pve-devel] [PATCH ha-manager 1/2] manager: support older versioning schema for ha group migration
@ 2025-08-04 14:20 Daniel Kral
2025-08-04 14:20 ` [pve-devel] [PATCH ha-manager 2/2] tree-wide: update description of pve-ha-node-list standard option Daniel Kral
2025-08-04 19:33 ` [pve-devel] applied: [PATCH ha-manager 1/2] manager: support older versioning schema for ha group migration Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Kral @ 2025-08-04 14:20 UTC (permalink / raw)
To: pve-devel
Prior to the Proxmox VE 8.x series, the pve-manager is versioned in the
format of `M.m-p`. Versions prior to Proxmox VE 8.x are already EOL'd,
but this change prevents any "Use of uninitialized value" log messages
if one of the nodes is on a version with such a versioning scheme.
Signed-off-by: Daniel Kral <d.kral@proxmox.com>
---
Missed that patch in the v2 for the follow-up for the ha-manager (but
was included in the v1).
Not really important (i.e. doesn't result in any fatal errors), but gets
rid of a "use of unitialized value" warning from perl while running the
tests/looking in the syslog in the rather unlikely (unsupported) case
that one has the CRM node running PVE 9.* and another node still running
7.4...
src/PVE/HA/Manager.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm
index 884d098b..ba59f642 100644
--- a/src/PVE/HA/Manager.pm
+++ b/src/PVE/HA/Manager.pm
@@ -539,7 +539,7 @@ my $have_groups_been_migrated = sub {
my $get_version_parts = sub {
my ($node_version) = @_;
- return $node_version =~ m/^(\d+)\.(\d+)\.(\d+)(?:~(\d+))?/;
+ return $node_version =~ m/^(\d+)\.(\d+)(?:\.|-)(\d+)(?:~(\d+))?/;
};
my $has_node_min_version = sub {
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] [PATCH ha-manager 2/2] tree-wide: update description of pve-ha-node-list standard option
2025-08-04 14:20 [pve-devel] [PATCH ha-manager 1/2] manager: support older versioning schema for ha group migration Daniel Kral
@ 2025-08-04 14:20 ` Daniel Kral
2025-08-04 19:33 ` [pve-devel] applied: [PATCH ha-manager 1/2] manager: support older versioning schema for ha group migration Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Kral @ 2025-08-04 14:20 UTC (permalink / raw)
To: 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 <d.kral@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
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] applied: [PATCH ha-manager 1/2] manager: support older versioning schema for ha group migration
2025-08-04 14:20 [pve-devel] [PATCH ha-manager 1/2] manager: support older versioning schema for ha group migration Daniel Kral
2025-08-04 14:20 ` [pve-devel] [PATCH ha-manager 2/2] tree-wide: update description of pve-ha-node-list standard option Daniel Kral
@ 2025-08-04 19:33 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2025-08-04 19:33 UTC (permalink / raw)
To: pve-devel, Daniel Kral
On Mon, 04 Aug 2025 16:20:53 +0200, Daniel Kral wrote:
> Prior to the Proxmox VE 8.x series, the pve-manager is versioned in the
> format of `M.m-p`. Versions prior to Proxmox VE 8.x are already EOL'd,
> but this change prevents any "Use of uninitialized value" log messages
> if one of the nodes is on a version with such a versioning scheme.
>
>
Applied, thanks!
[1/2] manager: support older versioning schema for ha group migration
commit: c447e5b4c8da07d6248346308c0b042024cdfa7e
[2/2] tree-wide: update description of pve-ha-node-list standard option
commit: 53a51329bed83b44a33e67f60c064ccfb38b24cf
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-04 19:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-04 14:20 [pve-devel] [PATCH ha-manager 1/2] manager: support older versioning schema for ha group migration Daniel Kral
2025-08-04 14:20 ` [pve-devel] [PATCH ha-manager 2/2] tree-wide: update description of pve-ha-node-list standard option Daniel Kral
2025-08-04 19:33 ` [pve-devel] applied: [PATCH ha-manager 1/2] manager: support older versioning schema for ha group migration Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.