3 Commits
Author SHA1 Message Date
dualfroz 0f3ea742cd Describe this repository 2026-10-22 21:06:08 +02:00
dualfroz a150ed90e9 fix #5794: cluster join: check that the interfaces of the links are up
Before joining a cluster, the IPs of the corosync links are checked to
be configured on the node. An IP on an interface without carrier, for
example with an unplugged cable, still counts as configured, so the
join is started even though corosync cannot reach the other nodes.
The join then fails halfway, and the node stays without quorum until
the link comes up, which looks like a split brain.

Additionally check the operational state of the interface the IP is
configured on and refuse to join if it is not up. Interfaces that
report their state as unknown, like dummy interfaces, are treated as
up. Like the other checks, this can be overridden with 'force'.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 02:06:52 +02:00
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