dualfroz 4298a304e1 fix #7326: corosync config: allow whitespace in values
The corosync.conf parser split the whole file into whitespace separated
tokens and always took exactly one token as value. Values containing
whitespace, like a manually set cluster_name "my cluster", are accepted
by corosync, but made the parser fail with "missing ':' after key".
Any API call reading the corosync config then failed, for example when
adding an HA resource.

Parse the file line by line instead, like corosync does, and take the
rest of the line after the first ':' as value. Section headers and
closing brackets still need to be on their own line, which corosync
requires anyway.

Add a test config with whitespace in the cluster name.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 11:35:16 +02:00
S
Description
My contributions to proxmox-git/pve-cluster: 2 commits
54 KiB
0 Stars 1 Watchers 0 Forks
Languages
Perl 100%