[pve-devel] [PATCH ha-manager] use correct verify function for ha-group-node-list
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Jun 3 14:07:08 CEST 2016
We use pve_verify_nodename but we expect here a value with the
syntax: nodename[:priority]
So if someone used the optional priority this failed unecessarily.
select_service_node in the Manager class expects this value and
splits it itself into nodename and priority so we can just return
it if it matches the ha-group-node-list format.
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
src/PVE/HA/Groups.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/HA/Groups.pm b/src/PVE/HA/Groups.pm
index 2e9fe13..9214764 100644
--- a/src/PVE/HA/Groups.pm
+++ b/src/PVE/HA/Groups.pm
@@ -64,7 +64,7 @@ sub decode_value {
my $res = {};
foreach my $node (PVE::Tools::split_list($value)) {
- if (PVE::JSONSchema::pve_verify_node_name($node)) {
+ if (PVE::HA::Tools::pve_verify_ha_group_node($node)) {
$res->{$node} = 1;
}
}
--
2.1.4
More information about the pve-devel
mailing list