]> git.proxmox.com Git - pve-cluster.git/commit
Add verification and fallback to cluster join/addnode
authorStefan Reiter <s.reiter@proxmox.com>
Thu, 9 Jan 2020 15:31:35 +0000 (16:31 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 5 Feb 2020 09:38:28 +0000 (10:38 +0100)
commit88b4cb1393d89fa5f2dcf6c7e55422366195c9ef
treeead1f6ba3ffb67420c0f840a46e34d5b072311a7
parent8ef581e4181b7928487e9ad7c07af66b8ee85b89
Add verification and fallback to cluster join/addnode

Verify that the config of the new node is valid and compatible with the
cluster (i.e. that the links for the new node match the currently
configured nodes).

Additionally, fallback is provided via a new parameter to addnode,
'new_node_ip'. Previously, fallback was handled on the joining node, by
setting it's local IP as 'link0', however, a cluster with only one link,
but numbered 1-7 is still valid, and a fallback is possible, but the old
code would now fail.

Instead, pass the locally resolved IP via a seperate parameter
(resolving the IP on the cluster side is impractical, as IP resolution
could fail or provide a wrong IP for Corosync).

For compatibility reasons, allow fallback to occur via the old
method as well, but mark with FIXME for future removal.

Fallback fails in case the cluster has more than one link, in this case
only the user can know which NIC/IP corresponds to which cluster link.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
data/PVE/API2/ClusterConfig.pm
data/PVE/CLI/pvecm.pm
data/PVE/Cluster/Setup.pm