]> git.proxmox.com Git - pve-cluster.git/commit
corosync: add verify_conf
authorStefan Reiter <s.reiter@proxmox.com>
Thu, 9 Jan 2020 15:31:33 +0000 (16:31 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 30 Jan 2020 19:26:09 +0000 (20:26 +0100)
commitb2cae1f8453cb2bed4ff29e1cfa38f601cf633d9
treea4b051fd42a222db796acb9b06bddc5a6783fa8c
parent3144ce43b3342bab9519eb0f5b14a55088c9ee93
corosync: add verify_conf

It does some basic sanity checking, warns the user about encryption
settings and unresolved hostnames, and finally makes sure that all nodes
have the same links configured (as well as comparing the configured
links to specified interfaces, if there are any).

A corosync.conf that has been created and modified strictly through our
API should *always* be valid.

verify_conf is called in 'addnode', warnings and errors are returned via
the API to be displayed in the task log of the node asking to join. If a
verification error occurs, it is handled specially via a "raise" outside
of any lock code that strips extra information from an Exception
instance. This ensures that multi-line formatted errors can be returned.
Warnings are always returned as array, to be printed on the caller.

Includes testing.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
data/PVE/API2/ClusterConfig.pm
data/PVE/Cluster/Setup.pm
data/PVE/Corosync.pm
data/test/corosync_parser_test.pl